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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
clear
in interfaceCollection
- Specified by:
clear
in interfaceSet
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceSet
-
size
public int size()- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceSet
-
add
- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceSet
-
addAll
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceSet
-
contains
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceSet
-
containsAll
- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceSet
-
iterator
-
remove
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceSet
-
removeAll
- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceSet
-
retainAll
- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceSet
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceSet
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in 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
-