public class FixedStringList
extends java.util.AbstractList<java.lang.String>
implements java.util.List<java.lang.String>, java.util.RandomAccess
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<FixedStringList> |
CASE_INSENSITIVE_ORDER
Provides a Comparator for FixedStringList objects that will sort the
contents in a Case Insensitive order.
|
static java.util.Comparator<FixedStringList> |
CASE_SENSITIVE_ORDER
Provides a Comparator for FixedStringList objects that will sort the
contents in a Case Sensitive order.
|
| Constructor and Description |
|---|
FixedStringList(java.util.Collection<java.lang.String> collection)
Creates a new FixedStringList from the given String Collection.
|
FixedStringList(int size)
Creates a new FixedStringList of the given size.
|
FixedStringList(java.lang.String... stringArray)
Creates a new FixedStringList from the given String Array.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.String element)
Adds a new String to this FixedStringList.
|
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.String> collection)
Adds a Collection of Strings to this FixedStringList.
|
static int |
compare(FixedStringList fsl1,
FixedStringList fsl2,
java.util.Comparator<java.lang.String> comparator)
Compares FixedStringList objects with the given String Comparator.
|
boolean |
equals(java.lang.Object obj)
Returns true is this FixedStringList is equal to the given Object.
|
boolean |
equalsIgnoreCase(FixedStringList fsl)
Returns true is this FixedStringList is equal to the given Object,
ignoring case in the underlying String objects.
|
java.lang.String |
get(int index)
Returns the String at the given index of this FixedStringList (may be
null if there is no String present at the given index and the index is
greater than or equal to 0 and less than or equal to the size of this
FixedStringList minus 1.
|
int |
hashCode() |
java.lang.String |
remove(int index)
Removes the String at the given index from this FixedStringList.
|
java.lang.String |
set(int index,
java.lang.String element)
Sets the String at the given index to the given value.
|
int |
size()
Returns the size of this FixedStringList.
|
add, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringpublic static final java.util.Comparator<FixedStringList> CASE_SENSITIVE_ORDER
public static final java.util.Comparator<FixedStringList> CASE_INSENSITIVE_ORDER
public FixedStringList(int size)
size - The size of the FixedStringList to be constructed.public FixedStringList(java.util.Collection<java.lang.String> collection)
collection - The String Collection to be used to initialize the size and
contents of this FixedStringListpublic FixedStringList(java.lang.String... stringArray)
stringArray - The String Array to be used to initialize the size and
contents of this FixedStringListpublic boolean add(java.lang.String element)
add in interface java.util.Collection<java.lang.String>add in interface java.util.List<java.lang.String>add in class java.util.AbstractList<java.lang.String>AbstractList.add(java.lang.Object)public boolean addAll(int index,
java.util.Collection<? extends java.lang.String> collection)
addAll in interface java.util.List<java.lang.String>addAll in class java.util.AbstractList<java.lang.String>AbstractList.addAll(int, java.util.Collection)public java.lang.String remove(int index)
remove in interface java.util.List<java.lang.String>remove in class java.util.AbstractList<java.lang.String>AbstractList.remove(int)public java.lang.String set(int index,
java.lang.String element)
set in interface java.util.List<java.lang.String>set in class java.util.AbstractList<java.lang.String>AbstractList.set(int, java.lang.Object)public java.lang.String get(int index)
get in interface java.util.List<java.lang.String>get in class java.util.AbstractList<java.lang.String>AbstractList.get(int)public int size()
size in interface java.util.Collection<java.lang.String>size in interface java.util.List<java.lang.String>size in class java.util.AbstractCollection<java.lang.String>AbstractCollection.size()public boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<java.lang.String>equals in interface java.util.List<java.lang.String>equals in class java.util.AbstractList<java.lang.String>AbstractList.equals(java.lang.Object)public int hashCode()
hashCode in interface java.util.Collection<java.lang.String>hashCode in interface java.util.List<java.lang.String>hashCode in class java.util.AbstractList<java.lang.String>public boolean equalsIgnoreCase(FixedStringList fsl)
fsl - The other FixedStringList to be checked if it is equal
(ignoring case) with this FixedStringListpublic static int compare(FixedStringList fsl1, FixedStringList fsl2, java.util.Comparator<java.lang.String> comparator)
fsl1 - The first FixedStringList to be comparedfsl2 - The second FixedStringList to be comparedcomparator - The underlying comparator to be used to check the contents of
the FixedStringList