|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.spire.doc.collections.TypedSortedListEx<TKey,TValue>
public class TypedSortedListEx<TKey extends java.util.Comparator,TValue>
Constructor Summary | |
---|---|
TypedSortedListEx()
Default constructor. |
|
TypedSortedListEx(java.util.Comparator comparer)
Creates an empty SortedList with the default initial capacity and specified comparer. |
|
TypedSortedListEx(java.util.Comparator comparer,
int capacity)
Creates an empty SortedList with the specified initial capacity and specified comparer. |
|
TypedSortedListEx(int initialCapacity)
Creates an empty list with the specified initial capacity. |
Method Summary | |
---|---|
void |
add(TKey key,
TValue value)
Adds an element with the provided key and value to the list. |
void |
clear()
Removes all elements from the collection. |
TypedSortedListEx |
cloneAll()
Clone current instance. |
boolean |
contains(TKey key)
Determines whether the list contains an element with the specified key. |
boolean |
containsKey(TKey key)
Determines whether the list contains an element with the specified key. |
boolean |
containsValue(TValue value)
Determines whether the list contains the specified value. |
void |
copyTo(com.spire.ms.System.Array array,
int arrayIndex)
Copies all the elements of the SortedListEx to the specified one-dimensional Array starting at the specified destination Array index. |
java.lang.Object |
deepClone()
Creates a new object that is a copy of the current instance. |
TValue |
get(TKey key)
Gets the value associated with the specified key. |
TValue |
getByIndex(int index)
Gets the value at the specified index of the SortedListEx. |
int |
getCapacity()
Capacity of internal buffers |
int |
getCount()
FontSize of the collection. |
TKey |
getKey(int index)
Gets the key at the specified index of the SortedListEx. |
com.spire.ms.System.Collections.IList |
getKeyList()
Gets the keys in the SortedListEx. |
com.spire.ms.System.Collections.IList |
getKeys()
List of keys. |
java.lang.Object |
getSyncRoot()
Returns the object that can be used to synchronize access to the collection. |
com.spire.ms.System.Collections.IList |
getValueList()
Gets the values in the SortedListEx. |
com.spire.ms.System.Collections.IList |
getValues()
List of values. |
int |
indexOfKey(TKey key)
Returns the zero-based index of the specified key. |
int |
indexOfValue(TValue value)
Returns the zero-based index of the first occurrence of the specified value. |
boolean |
isFixedSize()
Returns True if collection has fixed size, False otherwise. |
boolean |
isReadOnly()
Returns True if list is readonly, False otherwise. |
boolean |
isSynchronized()
Returns True if the collection is synchronized, False otherwise. |
boolean |
remove(TKey key)
Removes the element with the specified key from SortedListEx. |
void |
removeAt(int index)
Removes the element at the specified index. |
void |
set(TKey key,
TValue value)
Sets the value associated with the specified key. |
void |
setByIndex(int index,
TValue value)
Replaces the value at the specific index. |
void |
setCapacity(int value)
|
void |
trimToSize()
Sets the capacity to the actual number of elements. |
Constructor Detail |
---|
public TypedSortedListEx()
public TypedSortedListEx(int initialCapacity)
initialCapacity
- Initial capacity.
exception:When initialCapacity is less than zero will throw System.ArgumentOutOfRangeExceptionpublic TypedSortedListEx(java.util.Comparator comparer)
comparer
- The IComparer is used to determine whether two keys are equal.public TypedSortedListEx(java.util.Comparator comparer, int capacity)
comparer
- Initial capacity.capacity
- The IComparer is used to determine whether two keys are equal.Method Detail |
---|
public int getCapacity()
public void setCapacity(int value)
public int getCount()
public com.spire.ms.System.Collections.IList getKeys()
public com.spire.ms.System.Collections.IList getValues()
public boolean isReadOnly()
public boolean isFixedSize()
public boolean isSynchronized()
public java.lang.Object getSyncRoot()
public TValue get(TKey key)
key
- key
public void set(TKey key, TValue value)
key
- keyvalue
- valuepublic void add(TKey key, TValue value)
key
- The Object to use as the key of the element to add.value
- The Object to use as the value of the element to add.public void clear()
public java.lang.Object deepClone()
public TypedSortedListEx cloneAll()
public boolean contains(TKey key)
key
- Key of the element to search
public boolean containsKey(TKey key)
key
- Key of the element to search
public boolean containsValue(TValue value)
value
- Value of the element to search.
public void copyTo(com.spire.ms.System.Array array, int arrayIndex)
array
- The one-dimensional Array that is the destination of the
elements copied from the current list.arrayIndex
- The index in array at which copying begins.public TValue getByIndex(int index)
index
- The zero-based index of the value to get.
public TKey getKey(int index)
index
- The zero-based index of the key to get.
public com.spire.ms.System.Collections.IList getKeyList()
public com.spire.ms.System.Collections.IList getValueList()
public int indexOfKey(TKey key)
key
- The key to locate
public int indexOfValue(TValue value)
value
- The value to locate (can be NULL).
public void removeAt(int index)
index
- The zero-based index of the element to remove.public boolean remove(TKey key)
key
- The key of the element to remove.
public void setByIndex(int index, TValue value)
index
- The zero-based index at which to save value.value
- The Object to save into. Can be NULL.public void trimToSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |