Class AbstractSpecialisedImmutableSet<K>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- io.usethesource.capsule.util.collection.AbstractImmutableSet<K>
-
- io.usethesource.capsule.util.collection.AbstractSpecialisedImmutableSet<K>
-
- All Implemented Interfaces:
Set<K>,Set.Immutable<K>,SetEq<K>,SetEq.Immutable<K>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<K>,java.util.Collection<K>,java.util.Set<K>
public abstract class AbstractSpecialisedImmutableSet<K> extends AbstractImmutableSet<K> implements Set.Immutable<K>, java.lang.Cloneable, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.usethesource.capsule.Set
Set.Immutable<K>, Set.Transient<K>
-
Nested classes/interfaces inherited from interface io.usethesource.capsule.SetEq
SetEq.Immutable<K>, SetEq.Transient<K>
-
-
Field Summary
Fields Modifier and Type Field Description private static Set.ImmutableEMPTY_SET
-
Constructor Summary
Constructors Constructor Description AbstractSpecialisedImmutableSet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set.Immutable<K>__insertAll(java.util.Set<? extends K> set)Set.Immutable<K>__insertAllEquivalent(java.util.Set<? extends K> set, EqualityComparator<java.lang.Object> cmp)Set.Immutable<K>__removeAll(java.util.Set<? extends K> set)Set.Immutable<K>__removeAllEquivalent(java.util.Set<? extends K> set, EqualityComparator<java.lang.Object> cmp)Set.Immutable<K>__retainAll(java.util.Set<? extends K> set)Set.Immutable<K>__retainAllEquivalent(Set.Transient<? extends K> set, EqualityComparator<java.lang.Object> cmp)booleanadd(K k)booleanaddAll(java.util.Collection<? extends K> c)voidclear()java.lang.Objectclone()booleanequals(java.lang.Object other)booleanequivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)booleanisEmpty()booleanisTransientSupported()java.util.Iterator<K>iterator()private static <K> Set.Immutable<K>of()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)static <K> Set.Immutable<K>setOf()static <K> Set.Immutable<K>setOf(java.util.Set<K> set)static <K> Set.Immutable<K>setOf(K key1)static <K> Set.Immutable<K>setOf(K key1, K key2)static <K> Set.Immutable<K>setOf(K key1, K key2, K key3)static <K> Set.Immutable<K>setOf(K key1, K key2, K key3, K key4)static <K> Set.Immutable<K>setOf(K key1, K key2, K key3, K key4, K key5)static <K> Set.Immutable<K>setOf(K key1, K key2, K key3, K key4, K key5, K key6)-
Methods inherited from class io.usethesource.capsule.util.collection.AbstractImmutableSet
asTransient, containsAll, containsAllEquivalent
-
Methods inherited from class java.util.AbstractCollection
contains, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.usethesource.capsule.Set
contains, containsAll, findFirst, get, hashCode, keyIterator, size
-
Methods inherited from interface io.usethesource.capsule.Set.Immutable
__insert, __remove, asTransient, intersect, subtract, union
-
Methods inherited from interface io.usethesource.capsule.SetEq
containsAllEquivalent, containsEquivalent, getEquivalent
-
Methods inherited from interface io.usethesource.capsule.SetEq.Immutable
__insertEquivalent, __removeEquivalent
-
-
-
-
Field Detail
-
EMPTY_SET
private static Set.Immutable EMPTY_SET
-
-
Method Detail
-
of
private static <K> Set.Immutable<K> of()
-
setOf
public static <K> Set.Immutable<K> setOf()
-
setOf
public static <K> Set.Immutable<K> setOf(K key1)
-
setOf
public static <K> Set.Immutable<K> setOf(K key1, K key2)
-
setOf
public static <K> Set.Immutable<K> setOf(K key1, K key2, K key3)
-
setOf
public static <K> Set.Immutable<K> setOf(K key1, K key2, K key3, K key4)
-
setOf
public static <K> Set.Immutable<K> setOf(K key1, K key2, K key3, K key4, K key5)
-
setOf
public static <K> Set.Immutable<K> setOf(K key1, K key2, K key3, K key4, K key5, K key6)
-
setOf
public static <K> Set.Immutable<K> setOf(java.util.Set<K> set)
-
add
public boolean add(K k)
- Specified by:
addin interfacejava.util.Collection<K>- Specified by:
addin interfacejava.util.Set<K>- Overrides:
addin classAbstractImmutableSet<K>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<K>- Specified by:
removein interfacejava.util.Set<K>- Overrides:
removein classAbstractImmutableSet<K>
-
addAll
public boolean addAll(java.util.Collection<? extends K> c)
- Specified by:
addAllin interfacejava.util.Collection<K>- Specified by:
addAllin interfacejava.util.Set<K>- Overrides:
addAllin classAbstractImmutableSet<K>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<K>- Specified by:
removeAllin interfacejava.util.Set<K>- Overrides:
removeAllin classAbstractImmutableSet<K>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<K>- Specified by:
retainAllin interfacejava.util.Set<K>- Overrides:
retainAllin classAbstractImmutableSet<K>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<K>- Specified by:
clearin interfacejava.util.Set<K>- Overrides:
clearin classAbstractImmutableSet<K>
-
isEmpty
public boolean isEmpty()
-
iterator
public java.util.Iterator<K> iterator()
-
equals
public boolean equals(java.lang.Object other)
-
equivalent
public boolean equivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)- Specified by:
equivalentin interfaceSetEq<K>
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
isTransientSupported
public boolean isTransientSupported()
- Specified by:
isTransientSupportedin interfaceSet.Immutable<K>- Overrides:
isTransientSupportedin classAbstractImmutableSet<K>
-
__insertAll
public Set.Immutable<K> __insertAll(java.util.Set<? extends K> set)
- Specified by:
__insertAllin interfaceSet.Immutable<K>
-
__insertAllEquivalent
public Set.Immutable<K> __insertAllEquivalent(java.util.Set<? extends K> set, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__insertAllEquivalentin interfaceSetEq.Immutable<K>
-
__retainAll
public Set.Immutable<K> __retainAll(java.util.Set<? extends K> set)
- Specified by:
__retainAllin interfaceSet.Immutable<K>
-
__retainAllEquivalent
public Set.Immutable<K> __retainAllEquivalent(Set.Transient<? extends K> set, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__retainAllEquivalentin interfaceSetEq.Immutable<K>
-
__removeAll
public Set.Immutable<K> __removeAll(java.util.Set<? extends K> set)
- Specified by:
__removeAllin interfaceSet.Immutable<K>
-
__removeAllEquivalent
public Set.Immutable<K> __removeAllEquivalent(java.util.Set<? extends K> set, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__removeAllEquivalentin interfaceSetEq.Immutable<K>
-
-