IntList

All Methods Static Methods Instance Methods Concrete Methods  Modifier and Type Method and Description void add(int index, int amount)  void append(int value)

Add a new entry to the list.

void append(int[] values)  void append(IntList list)  void appendUnique(int value)

Add this value, but only if it's not already in the list.

int[] array()

Create a new array with a copy of all the values.

int[] array(int[] array)

Copy values into the specified array.

void clear()

Remove all entries from the list.

IntList copy()  void div(int index, int amount)  static IntList fromRange(int stop)  static IntList fromRange(int start, int stop)  int get(int index)

Get an entry at a particular index.

FloatList getPercent()

Returns a normalized version of this array.

IntList getSubset(int start)  IntList getSubset(int start, int num)  boolean hasValue(int value)  void increment(int index)  int index(int what)

Return the first index of a particular value.

void insert(int index, int value)  void insert(int index, int[] values)  void insert(int index, IntList list)  java.util.Iterator<java.lang.Integer> iterator()  java.lang.String join(java.lang.String separator)  int max()  int maxIndex()  int min()  int minIndex()  void mult(int index, int amount)  int pop()  void print()  void push(int value)

Just an alias for append(), but matches pop()

int remove(int index)

Remove an element from the specified index

int removeValue(int value)  int removeValues(int value)  void resize(int length)  void reverse()  void save(java.io.File file)

Save tab-delimited entries to a file (TSV format, UTF-8 encoding)

void set(int index, int what)

Set the entry at a particular index.

void shuffle()

Randomize the order of the list elements.

void shuffle(PApplet sketch)

Randomize the list order using the random() function from the specified sketch, allowing shuffle() to use its current randomSeed() setting.

int size()

Get the length of the list.

void sort()

Sorts the array in place.

void sortReverse()

Reverse sort, orders values from highest to lowest.

void sub(int index, int amount)  int sum()  long sumLong()  java.lang.String toJSON()

Return this dictionary as a String in JSON format.

java.lang.String toString()  int[] values()

Returns the actual array being used to store the data.

void write(java.io.PrintWriter writer)

Write entries to a PrintWriter, one per line