org.jibx.util
Class InsertionOrderedSet
java.lang.Object
org.jibx.util.InsertionOrderedSet
- All Implemented Interfaces:
- Iterable, Collection, Set
public class InsertionOrderedSet
- extends Object
- implements Set
Set with values iterated in insertion order. This is similar to the Java 1.4
java.util.LinkedHashSet class, but compatible with earlier JVM versions. This
implementation is for insert-only sets.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InsertionOrderedSet
public InsertionOrderedSet()
clear
public void clear()
- Specified by:
clear in interface Collection- Specified by:
clear in interface Set
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection- Specified by:
isEmpty in interface Set
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in interface Set
add
public boolean add(Object o)
- Specified by:
add in interface Collection- Specified by:
add in interface Set
addAll
public boolean addAll(Collection c)
- Specified by:
addAll in interface Collection- Specified by:
addAll in interface Set
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection- Specified by:
contains in interface Set
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll in interface Collection- Specified by:
containsAll in interface Set
iterator
public Iterator iterator()
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection- Specified by:
iterator in interface Set
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection- Specified by:
remove in interface Set
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll in interface Collection- Specified by:
removeAll in interface Set
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll in interface Collection- Specified by:
retainAll in interface Set
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface Set
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface Set
addAll
public void addAll(Object[] objs)
- Convenience method to add every item in an array.
- Parameters:
objs -
asList
public List asList()
- Get list of values in order added. The returned list is a static copy of
the current list.
- Returns:
- list
Copyright © 2005-2011 jibx.org. All Rights Reserved.