|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cycling74.max.Atom
public abstract class Atom
PD element that is used in message or arguments. It can contains a float, a int (always map to a float in pd) or a string.
| Field Summary | |
|---|---|
static Atom[] |
emptyArray
Empty array to use with the API when theres is no arguments. |
| Method Summary | |
|---|---|
abstract boolean |
equals(Object object)
Returns true if the instance has the same value of the object object. |
float |
getFloat()
Get float value for this Atom. |
int |
getInt()
Get int value for this Atom. |
String |
getString()
Get string value for this Atom. |
abstract int |
hashCode()
Returns the hashCode representation for this Atom. |
static Atom[] |
intersection(Atom[] first,
Atom[] second)
Don't know what this does. |
boolean |
isFloat()
Returns true if the Atom has been created with a float. |
static int |
isIn(Atom org,
Atom[] list)
Returns the index of the first atom that is found in the list. |
static int |
isIn(Atom org,
Atom[] list,
int from,
int to)
Returns the index of the first atom that is found in the list. |
boolean |
isInt()
Returns true if the Atom has been created with a int. |
boolean |
isString()
Returns true if the Atom has been created with a String. |
static Atom |
newAtom(boolean value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(boolean[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(byte value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(byte[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(char value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(char[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(double value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(double[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(float value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(float[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(int value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(int[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(long value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(long[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(short value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(short[] value)
Creates a new atom with the specified type. |
static Atom |
newAtom(String value)
Creates a new atom with the specified type. |
static Atom[] |
newAtom(String[] value)
Creates a new atom with the specified type. |
static Atom[] |
parse(String values)
Creates an array of atoms from string tokens. |
static Atom[] |
parse(String values,
boolean skipfirst)
Creates an array of atoms from strings tokens. |
static Atom[] |
removeFirst(Atom[] list)
Removes the first atom in the list. |
static Atom[] |
removeFirst(Atom[] list,
int howmany)
Removes the first howmany atoms in the list. |
static Atom[] |
removeLast(Atom[] list)
Remove the last atom in the list. |
static Atom[] |
removeLast(Atom[] list,
int howmany)
Removes the last howmany atoms in the list. |
static Atom[] |
removeOne(Atom[] list,
int i)
Removes one atom in the list. |
static Atom[] |
removeSome(Atom[] list,
int from,
int to)
Remove at index from to index to. |
static Atom[] |
reverse(Atom[] list)
Reverses the element content; the first element is the last and so on. |
static Atom[] |
rotate(Atom[] list,
int nbTimes)
Rotates array content x number of times. |
boolean |
toBoolean()
Returns the boolean value of this atom. |
static boolean[] |
toBoolean(Atom[] values)
Transform an array of Atom into an array of booleans. |
byte |
toByte()
Returns the byte value of this atom. |
static byte[] |
toByte(Atom[] values)
Transform an array of Atom into an array of bytes. |
char |
toChar()
Returns the char value of this atom. |
static char[] |
toChar(Atom[] values)
Transform an array of Atom into an array of chars. |
static String |
toDebugString(Atom[] values)
Used to return a string representation of the list with atom type. |
double |
toDouble()
Returns the double value of this atom. |
static double[] |
toDouble(Atom[] values)
Transform an array of Atom into an array of doubles. |
float |
toFloat()
Returns the float value of this atom. |
static float[] |
toFloat(Atom[] values)
Transform an array of Atom into an array of floats. |
int |
toInt()
Returns the int value of this atom. |
static int[] |
toInt(Atom[] values)
Transform an array of Atom into an array of ints. |
long |
toLong()
Returns the long value of this atom. |
static long[] |
toLong(Atom[] values)
Transform an array of Atom into an array of longs. |
static String |
toOneString(Atom[] array)
Returns the array of Atom into one string. |
short |
toShort()
Returns the short value of this atom. |
static short[] |
toShort(Atom[] values)
Transform an array of Atom into an array of shorts. |
static String[] |
toString(Atom[] array)
Transform an array of Atom into an array of strings. |
static Atom[] |
union(Atom[] first,
Atom[] second)
Don't know what this does. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
public static final Atom[] emptyArray
| Method Detail |
|---|
public static Atom newAtom(int value)
value - the value of the atom
public static Atom[] newAtom(int[] value)
value - the value of the atom
public static Atom newAtom(long value)
value - the value of the atom
public static Atom[] newAtom(long[] value)
value - the value of the atom
public static Atom newAtom(short value)
value - the value of the atom
public static Atom[] newAtom(short[] value)
value - the value of the atom
public static Atom newAtom(byte value)
value - the value of the atom
public static Atom[] newAtom(byte[] value)
value - the value of the atom
public static Atom newAtom(char value)
value - the value of the atom
public static Atom[] newAtom(char[] value)
value - the value of the atom
public static Atom newAtom(boolean value)
value - the value of the atom
public static Atom[] newAtom(boolean[] value)
value - the value of the atom
public static Atom newAtom(float value)
value - the value of the atom
public static Atom[] newAtom(float[] value)
value - the value of the atom
public static Atom newAtom(double value)
value - the value of the atom
public static Atom[] newAtom(double[] value)
value - the value of the atom
public static Atom newAtom(String value)
value - the value of the atom
public static Atom[] newAtom(String[] value)
value - the value of the atom
public static Atom[] parse(String values)
values - the atoms value seperated by string
public static Atom[] parse(String values,
boolean skipfirst)
values - the atoms value seperated by stringskipfirst - skip the first token
public String getString()
public int getInt()
public float getFloat()
public double toDouble()
public static double[] toDouble(Atom[] values)
values - the array of atoms
public int toInt()
public static int[] toInt(Atom[] values)
values - the array of atoms
public char toChar()
public static char[] toChar(Atom[] values)
values - the array of atoms
public byte toByte()
public static byte[] toByte(Atom[] values)
values - the array of atoms
public long toLong()
public static long[] toLong(Atom[] values)
values - the array of atoms
public short toShort()
public static short[] toShort(Atom[] values)
values - the array of atoms
public float toFloat()
public static float[] toFloat(Atom[] values)
values - the array of atoms
public boolean toBoolean()
public static boolean[] toBoolean(Atom[] values)
values - the array of atoms
public static String[] toString(Atom[] array)
array - the array of atoms
public boolean isFloat()
public boolean isString()
public boolean isInt()
public static String toOneString(Atom[] array)
array - the array of atom
public abstract boolean equals(Object object)
object. Similar to "ok".equals("ok");
equals in class Objectpublic abstract int hashCode()
hashCode in class Object
public static int isIn(Atom org,
Atom[] list)
org - the atom to findlist - the list of atom to search
public static int isIn(Atom org,
Atom[] list,
int from,
int to)
org - the atom to findlist - the list of atom to searchfrom - the start index to checkto - the last index to check
public static Atom[] removeSome(Atom[] list,
int from,
int to)
from to index to.
list - the list to stripfrom - the start indexto - the last index
public static Atom[] removeOne(Atom[] list,
int i)
list - the list to stripi - the index of the atom to remove
public static Atom[] removeFirst(Atom[] list)
list - the list to strip
public static Atom[] removeFirst(Atom[] list,
int howmany)
howmany atoms in the list.
list - the list to striphowmany - how many element to remove
public static Atom[] removeLast(Atom[] list)
list - the list to strip
public static Atom[] removeLast(Atom[] list,
int howmany)
howmany atoms in the list.
list - the list to striphowmany - how many element to remove
public static Atom[] reverse(Atom[] list)
list - the list to reverse
public static Atom[] rotate(Atom[] list,
int nbTimes)
list - the list to rotatenbTimes - the number of time that the array must be rotated
public static Atom[] union(Atom[] first,
Atom[] second)
throws UnsupportedOperationException
first - second -
UnsupportedOperationException
public static Atom[] intersection(Atom[] first,
Atom[] second)
throws UnsupportedOperationException
first - second -
UnsupportedOperationExceptionpublic static String toDebugString(Atom[] values)
values - the array of atoms
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||