|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.Vector
wt.clients.util.StringVector
Class StringVector
is a utility class for creating Vectors
that contain only String
objects. The Vector of strings can be
created in a given sorted order where the default sorting order is ascending (a to z).
Supported API: false
Extendable: false
Nested Class Summary |
Nested classes inherited from class java.util.AbstractList |
|
Field Summary | |
static int |
ASCENDING
Defined int constant to indicate a sorting order of ascending |
static int |
DESCENDING
Defined int constant to indicate a sorting order of descending |
private static String |
versionID
|
Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
StringVector()
Default constructor for StringVector . |
|
StringVector(Enumeration elements)
Constructor for StringVector . |
|
StringVector(String[] elements)
Constructor for StringVector . |
|
StringVector(String[] elements,
int sort_type)
Constructor for StringVector . |
Method Summary | |
private void |
sort()
|
void |
sort(com.objectspace.jgl.BinaryPredicate direction)
Sorts this StringVector using the given
BinaryPredicate to specify the sorting direction. |
void |
sort(int direction)
Sorts this StringVector in the given direction. |
Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
Field Detail |
private static final String versionID
public static final int ASCENDING
int
constant to indicate a sorting order of ascending
public static final int DESCENDING
int
constant to indicate a sorting order of descending
Constructor Detail |
public StringVector()
StringVector
. The Vector is created
as unsorted.
public StringVector(String[] elements)
StringVector
. The given array of
Strings
is placed in the Vector
, and the Vector
is sorted in ascending order.
elements
- an Array of String
elements which are
added to the Vector and sortedpublic StringVector(String[] elements, int sort_type)
StringVector
. The given array of
Strings
is placed in the Vector
, and the Vector
is sorted in the order specified by the given sorting type.
elements
- an Array of String
elements which are
added to the Vector and sortedsort_type
- an int
specifying the sorting direction:
ASCENDING, DESCENDINGpublic StringVector(Enumeration elements)
StringVector
. The elements of the given
Enumeration
are used to initialize the Vector. The
Vector is sorted in the default ascending order.
elements
- an Enumeration
of elements to be added
to the Vector and sortedMethod Detail |
private void sort()
public void sort(int direction)
StringVector
in the given direction.
direction
- the int
direction in which to
sort the Vector. If the given value is not one of
ASCENDING or DESCENDING, then ASCENDING is used.public void sort(com.objectspace.jgl.BinaryPredicate direction)
StringVector
using the given
BinaryPredicate
to specify the sorting direction.
direction
- the BinaryPredicate
specifying
the sorting direction to use.BinaryPredicate
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |