Class StrictHashSet<E>
java.lang.Object
com.polarion.alm.shared.api.utils.collections.StrictHashSet<E>
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
,IterableWithSize<E>
,ReadOnlyStrictCollection<E>
,StrictCollection<E>
,Serializable
,Iterable<E>
Keeps order of elements how they were added
- Since:
- 3.9.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
addAllTo
(Collection<? super E> collection) asSet()
The returned set isSerializable
void
clear()
boolean
boolean
containsAll
(Iterable<? extends E> elements) boolean
int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
boolean
int
size()
E[]
Iterating over array is faster, when checking for concurrent modification is not needed.Returns new ArrayList containing the same elements, so modifying the returned list does not modify the original collection.toString()
<T> StrictHashSet<T>
toTransformed
(NotStrictTransformer<E, T> transformer) Each element from the collection will be transformed or skipped (if transformer returnsnull
)<T> StrictHashSet<T>
toTransformed
(StrictTransformer<E, T> transformer) Each element from the collection will be transformed.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StrictHashSet
public StrictHashSet() -
StrictHashSet
-
StrictHashSet
-
-
Method Details
-
addAllTo
- Specified by:
addAllTo
in interfaceIterableWithSize<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceIterableWithSize<E>
-
size
public int size()- Specified by:
size
in interfaceIterableWithSize<E>
-
contains
- Specified by:
contains
in interfaceReadOnlyStrictCollection<E>
-
containsAll
- Specified by:
containsAll
in interfaceReadOnlyStrictCollection<E>
-
add
- Specified by:
add
in interfaceStrictCollection<E>
-
addAll
- Specified by:
addAll
in interfaceStrictCollection<E>
-
remove
- Specified by:
remove
in interfaceStrictCollection<E>
-
removeAll
- Specified by:
removeAll
in interfaceStrictCollection<E>
-
retainAll
- Specified by:
retainAll
in interfaceStrictCollection<E>
-
clear
public void clear()- Specified by:
clear
in interfaceStrictCollection<E>
-
iterator
-
toImmutableList
-
toArrayList
Description copied from interface:IterableWithSize
Returns new ArrayList containing the same elements, so modifying the returned list does not modify the original collection.- Specified by:
toArrayList
in interfaceIterableWithSize<E>
-
toArray
Description copied from interface:IterableWithSize
Iterating over array is faster, when checking for concurrent modification is not needed.- Specified by:
toArray
in interfaceIterableWithSize<E>
- Parameters:
a
- - must have exactly the same size as the collection
-
toString
-
hashCode
public int hashCode() -
equals
-
asSet
The returned set isSerializable
-