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.Immutable
EMPTY_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)
boolean
add(K k)
boolean
addAll(java.util.Collection<? extends K> c)
void
clear()
java.lang.Object
clone()
boolean
equals(java.lang.Object other)
boolean
equivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)
boolean
isEmpty()
boolean
isTransientSupported()
java.util.Iterator<K>
iterator()
private static <K> Set.Immutable<K>
of()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(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:
add
in interfacejava.util.Collection<K>
- Specified by:
add
in interfacejava.util.Set<K>
- Overrides:
add
in classAbstractImmutableSet<K>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<K>
- Specified by:
remove
in interfacejava.util.Set<K>
- Overrides:
remove
in classAbstractImmutableSet<K>
-
addAll
public boolean addAll(java.util.Collection<? extends K> c)
- Specified by:
addAll
in interfacejava.util.Collection<K>
- Specified by:
addAll
in interfacejava.util.Set<K>
- Overrides:
addAll
in classAbstractImmutableSet<K>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<K>
- Specified by:
removeAll
in interfacejava.util.Set<K>
- Overrides:
removeAll
in classAbstractImmutableSet<K>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<K>
- Specified by:
retainAll
in interfacejava.util.Set<K>
- Overrides:
retainAll
in classAbstractImmutableSet<K>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<K>
- Specified by:
clear
in interfacejava.util.Set<K>
- Overrides:
clear
in 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:
equivalent
in interfaceSetEq<K>
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
isTransientSupported
public boolean isTransientSupported()
- Specified by:
isTransientSupported
in interfaceSet.Immutable<K>
- Overrides:
isTransientSupported
in classAbstractImmutableSet<K>
-
__insertAll
public Set.Immutable<K> __insertAll(java.util.Set<? extends K> set)
- Specified by:
__insertAll
in interfaceSet.Immutable<K>
-
__insertAllEquivalent
public Set.Immutable<K> __insertAllEquivalent(java.util.Set<? extends K> set, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__insertAllEquivalent
in interfaceSetEq.Immutable<K>
-
__retainAll
public Set.Immutable<K> __retainAll(java.util.Set<? extends K> set)
- Specified by:
__retainAll
in interfaceSet.Immutable<K>
-
__retainAllEquivalent
public Set.Immutable<K> __retainAllEquivalent(Set.Transient<? extends K> set, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__retainAllEquivalent
in interfaceSetEq.Immutable<K>
-
__removeAll
public Set.Immutable<K> __removeAll(java.util.Set<? extends K> set)
- Specified by:
__removeAll
in interfaceSet.Immutable<K>
-
__removeAllEquivalent
public Set.Immutable<K> __removeAllEquivalent(java.util.Set<? extends K> set, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__removeAllEquivalent
in interfaceSetEq.Immutable<K>
-
-