|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.javelot.functionalj.util.Lists
Methods concerning Lists.
| Method Summary | |
static List |
asList(boolean[] p_booleans)
Returns a List of Booleans from an array
of booleans. |
static List |
asList(byte[] p_bytes)
Returns a List of Bytes from an array
of bytes. |
static List |
asList(char[] p_chars)
Returns a List of Characters from an array
of chars. |
static List |
asList(double[] p_doubles)
Returns a List of Doubles from an array
of doubles. |
static List |
asList(float[] p_floats)
Returns a List of Floats from an array
of floats. |
static List |
asList(int[] p_ints)
Returns a List of Integers from an array
of ints. |
static List |
asList(long[] p_longs)
Returns a List of Longs from an array
of longs. |
static List |
asList(Object[] p_objects)
Returns a List from an array of Objects,
returning an empty List if the array is null. |
static List |
asList(short[] p_shorts)
Returns a List of Shorts from an array
of shorts. |
static List |
asList(String p_string)
Returns a List of Characters from a
String. |
static Object |
head(List p_list)
Returns the head (first) element of a list. |
static List |
init(List p_list)
Returns the initial of a list, that is, all elements except the last. |
static Iterator |
iterator(List p_list)
Returns the Iterator for the specified list, or an empty
iterator if the list is null, to avoid
NullPointerExceptions. |
static Object |
last(List p_list)
Returns the last element of a list. |
static int |
sizeOf(List p_list)
Returns the size of a list, returning zero if the list is null. |
static int |
sizeOf(Object[] p_array)
Returns the size of a array, returning zero if the array is null. |
static int |
sizeOf(String p_string)
Returns the size of a string, returning zero if the string is null. |
static List |
tail(List p_list)
Returns the tail of a list, that is, all elements except the first. |
static int[] |
toIntArray(List p_list)
Returns an array of ints from a List of Integers. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Object head(List p_list)
throws FunctionException
p_list - the list for which to return the head element.
FunctionException - thrown if the list is null or empty.public static List tail(List p_list)
p_list - the list for which to return the tail.
public static List init(List p_list)
p_list - the list for which to return the initial part.
public static Object last(List p_list)
p_list - the list for which to return the last element.
FunctionException - thrown if the list is null or empty.public static List asList(Object[] p_objects)
List from an array of Objects,
returning an empty List if the array is null.
p_objects - the array of Objects to be converted to
a List.
List of Objects.public static List asList(boolean[] p_booleans)
List of Booleans from an array
of booleans.
p_booleans - the array of boolean values to be converted to
a List.
List of Boolean objects.public static List asList(byte[] p_bytes)
List of Bytes from an array
of bytes.
p_bytes - the array of byte values to be converted to a
List.
List of Byte objects.public static List asList(char[] p_chars)
List of Characters from an array
of chars.
p_chars - the array of char values to be converted to a
List.
List of Character objects.public static List asList(double[] p_doubles)
List of Doubles from an array
of doubles.
p_doubles - the array of double values to be converted to a
List.
List of Double objects.public static List asList(float[] p_floats)
List of Floats from an array
of floats.
p_floats - the array of float values to be converted to a
List.
List of Float objects.public static List asList(int[] p_ints)
List of Integers from an array
of ints.
p_ints - the array of int values to be converted to a
List.
List of Integer objects.public static List asList(long[] p_longs)
List of Longs from an array
of longs.
p_longs - the array of long values to be converted to a
List.
List of Long objects.public static List asList(short[] p_shorts)
List of Shorts from an array
of shorts.
p_shorts - the array of short values to be converted to a
List.
List of Short objects.public static List asList(String p_string)
List of Characters from a
String.
p_string - the String to be converted to a
List.
List of Character objects.public static int sizeOf(List p_list)
null.
p_list - the list for which to return the size.
0 if the list is
null.public static int sizeOf(Object[] p_array)
null.
p_array - the array for which to return the size.
0 if the array is
null.public static int sizeOf(String p_string)
null.
p_string - the string for which to return the size.
0 if the string is
null.public static int[] toIntArray(List p_list)
ints from a List of Integers.
p_list - the list of Integers to be converted to an
array of ints.
ints.public static Iterator iterator(List p_list)
Iterator for the specified list, or an empty
iterator if the list is null, to avoid
NullPointerExceptions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||