|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.util.Collections
@Deprecated public class Collections
Static utility methods for processing collections.
| Method Summary | ||
|---|---|---|
static
|
addAll(Collection<? super E> c,
E[] xs)
Deprecated. Use java.util.Collections.addAll(Collection,Object[]) instead. |
|
static
|
compare(E e1,
E e2,
Comparator<? super E> comparator)
Deprecated. Implement directly using the comparator or objects. |
|
static void |
elementsToStringBuilder(StringBuilder sb,
Collection<?> c)
Deprecated. Use sb.append(c.toString()) instead. |
|
static
|
getFirst(List<? extends E> l)
Deprecated. Use l.get(0) instead. |
|
static
|
getFirst(Set<? extends E> s)
Deprecated. Use set.iterator().next() instead. |
|
static boolean |
intersects(Set<?> set1,
Set<?> set2)
Deprecated. Use !java.util.Collections.disjoint(set1,set2). |
|
static boolean |
isSingleton(Collection<?> c)
Deprecated. Use c.size() == 1 instead. |
|
static String |
listToString(List<?> ls)
Deprecated. Use List.toString() instead. |
|
static void |
listToStringBuilder(StringBuilder sb,
List<?> ls)
Deprecated. Use sb.append(ls.toString()). |
|
static String |
setToString(Set<?> s)
Deprecated. Use Set.toString() instead. |
|
static void |
setToStringBuilder(StringBuilder sb,
Set<?> c)
Deprecated. Use sb.append(c.toString()) instead. |
|
static int[] |
toIntArray(Collection<? extends Number> cs)
Deprecated. Implement directly using Number.intValue(). |
|
static String[] |
toStringArray(Collection<?> c)
Deprecated. Use Collection.toArray(Object[]) instead. |
|
static void |
toStringArray(Collection<?> c,
String[] members)
Deprecated. Use Collection.toArray(Object[]) instead. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@Deprecated public static boolean isSingleton(Collection<?> c)
c.size() == 1 instead.
true if the specified collection contains
exactly one member.
c - Collection to test.
true if the specified collection contains
exactly one member.@Deprecated public static <E> E getFirst(List<? extends E> l)
l.get(0) instead.
E - type of objects in the listl - List whose first member is returned.
IndexOutOfBoundsException - If the list is empty.@Deprecated public static <E> E getFirst(Set<? extends E> s)
set.iterator().next() instead.
E - type of objects in the lists - Set whose first member is returned.
NoSuchElementException - If the set is empty.
@Deprecated
public static boolean intersects(Set<?> set1,
Set<?> set2)
!java.util.Collections.disjoint(set1,set2).
true if the specified sets have at least one
element in common.
set1 - First set.set2 - Second set.
true if the specified sets have at least
one element in common.
@Deprecated
public static <E> void addAll(Collection<? super E> c,
E[] xs)
java.util.Collections.addAll(Collection,Object[]) instead.
E - type of objects in the collectionc - Collection to which objects are added.xs - Objects to add to the collection.@Deprecated public static String[] toStringArray(Collection<?> c)
Collection.toArray(Object[]) instead.
c - Collection to convert to an array.
@Deprecated
public static void toStringArray(Collection<?> c,
String[] members)
Collection.toArray(Object[]) instead.
c - Collection to convert to an array.members - String rray to write collection into.
IndexOutOfBoundsException - If the size of the collection
is greater than the length of the array.@Deprecated public static int[] toIntArray(Collection<? extends Number> cs)
Number.intValue().
int consisting
of the elements of the specified collection converted
to int.
cs - Collection of integers to convert to ints.
@Deprecated public static String setToString(Set<?> s)
Set.toString() instead.
s - Set to convert to string.
@Deprecated public static String listToString(List<?> ls)
List.toString() instead.
ls - List to convert to string.
@Deprecated
public static void listToStringBuilder(StringBuilder sb,
List<?> ls)
sb.append(ls.toString()).
sb - String buffer to which the representation is appended.ls - List to append as a string.
@Deprecated
public static void setToStringBuilder(StringBuilder sb,
Set<?> c)
sb.append(c.toString()) instead.
sb - String buffer to which the representation is appended.c - Set to append as a string.
@Deprecated
public static void elementsToStringBuilder(StringBuilder sb,
Collection<?> c)
sb.append(c.toString()) instead.
sb - String buffer to which the representation is appended.c - Collection to append as a string.
@Deprecated
public static <E> int compare(E e1,
E e2,
Comparator<? super E> comparator)
E - type of objects being comparede1 - First object.e2 - Second object.comparator - Comparator for objects, or null
ClassCastException - If the comparator is null
and the object e1 is not an instance of Comparable<? super E>.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||