Package org.jibx.util
Class InsertionOrderedSet
java.lang.Object
org.jibx.util.InsertionOrderedSet
- All Implemented Interfaces:
Iterable,Collection,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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Field Details
-
m_baseMap
-
m_insertList
-
-
Constructor Details
-
InsertionOrderedSet
public InsertionOrderedSet()
-
-
Method Details
-
clear
public void clear()- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceSet
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceSet
-
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceSet
-
add
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceSet
-
addAll
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceSet
-
contains
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceSet
-
containsAll
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceSet
-
iterator
-
remove
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceSet
-
removeAll
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceSet
-
retainAll
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceSet
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
toArray
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
addAll
Convenience method to add every item in an array.- Parameters:
objs-
-
asList
Get list of values in order added. The returned list is a static copy of the current list.- Returns:
- list
-