public class OrderedMap extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_SYNCHRONIZED |
static int |
TYPE_UNSYNCHRONIZED |
static int |
TYPE_UNSYNCHRONIZED_MOV |
Constructor and Description |
---|
OrderedMap(int type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Object eKey,
Object element)
Adds element with the key into the Ordered List.
|
void |
clear()
Clears the Ordered List.
|
boolean |
contains(Object element)
Checks to see if the element is in the Ordered List.
|
boolean |
containsElementKey(Object eKey)
Checks if elementkey exists in the Ordered List.
|
boolean |
containsKey(Object eKey)
Checks to see if the element key exists.
|
Iterator |
elementKeys()
Gets Element keys.
|
Object[] |
elements()
Gets all the elements in the Ordered List in the Order in which they were entered.
|
Object |
getElement(int position)
Gets Element at a given position.
|
Object |
getElement(Object elementKey)
Gets Element for the Element Key.
|
List |
getElementOrder()
.
|
int |
getType()
Gets the type of the OrderedList.
|
int |
indexOf(Object eKey)
Gets index of a given element with element key.
|
void |
insert(Object eKey,
Object element,
int position)
Inserts element at a position.
|
int |
size()
Gets size of the ordered list.
|
public static final int TYPE_SYNCHRONIZED
public static final int TYPE_UNSYNCHRONIZED
public static final int TYPE_UNSYNCHRONIZED_MOV
public OrderedMap(int type)
type
- the type of the OrderedMap, possible values are TYPE_SYNCHRONIZED, TYPE_UNSYNCHRONIZED,
TYPE_UNSYNCHRONIZED_MOVpublic int size()
public void clear()
public int getType()
public boolean contains(Object element)
element
- Element to be checkedpublic boolean containsKey(Object eKey)
eKey
- Element keypublic boolean containsElementKey(Object eKey)
eKey
- Element keypublic List getElementOrder()
Contructor
public Object getElement(Object elementKey)
elementKey
- the element keypublic Object getElement(int position)
position
- the position of the elementpublic Object[] elements()
public Iterator elementKeys()
public void insert(Object eKey, Object element, int position)
eKey
- Element Keyelement
- Element to be insertedposition
- position at which element is to be insertedpublic int indexOf(Object eKey)
eKey
- the element keyCopyright © 2015. All rights reserved.