Class TransformingCollection<InternalV,ExternalV>
java.lang.Object
com.electronwill.nightconfig.core.utils.TransformingCollection<InternalV,ExternalV>
- All Implemented Interfaces:
Iterable<ExternalV>,Collection<ExternalV>
- Direct Known Subclasses:
TransformingList,TransformingSet
public class TransformingCollection<InternalV,ExternalV>
extends Object
implements Collection<ExternalV>
A TransformingCollection applies "just in time" transformations to a
Collection<InternalV> in order to make it like a Collection<ExternalV>.
The transformations are applied "just in time", that is, the values are converted only when they are used, not during the construction of the TransformingCollection.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends ExternalV> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanvoidinthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) intsize()stream()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
toArray
-
Field Details
-
readTransformation
-
writeTransformation
-
searchTransformation
-
internalCollection
-
-
Constructor Details
-
TransformingCollection
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<InternalV>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<InternalV>
-
contains
- Specified by:
containsin interfaceCollection<InternalV>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<InternalV>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<InternalV>
-
add
- Specified by:
addin interfaceCollection<InternalV>
-
remove
- Specified by:
removein interfaceCollection<InternalV>
-
containsAll
- Specified by:
containsAllin interfaceCollection<InternalV>
-
addAll
- Specified by:
addAllin interfaceCollection<InternalV>
-
removeAll
- Specified by:
removeAllin interfaceCollection<InternalV>
-
removeIf
- Specified by:
removeIfin interfaceCollection<InternalV>
-
retainAll
- Specified by:
retainAllin interfaceCollection<InternalV>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<InternalV>
-
spliterator
- Specified by:
spliteratorin interfaceCollection<InternalV>- Specified by:
spliteratorin interfaceIterable<InternalV>
-
stream
- Specified by:
streamin interfaceCollection<InternalV>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<InternalV>
-
forEach
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<InternalV>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<InternalV>- Overrides:
equalsin classObject
-
toString
-