Package io.usethesource.capsule.core
Class PersistentTrieSet.AbstractTransientTrieSet<K>
java.lang.Object
io.usethesource.capsule.core.PersistentTrieSet.AbstractTransientTrieSet<K>
- All Implemented Interfaces:
Set<K>,Set.Transient<K>,SetEq<K>,SetEq.Transient<K>,Iterable<K>,Collection<K>,Set<K>
- Direct Known Subclasses:
PersistentTrieSet.TransientTrieSet
- Enclosing class:
PersistentTrieSet<K>
abstract static class PersistentTrieSet.AbstractTransientTrieSet<K>
extends Object
implements Set.Transient<K>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested 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
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected PersistentTrieSet.AbstractSetNode<K> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean__insertAll(Set<? extends K> set) boolean__insertAllEquivalent(Set<? extends K> set, EqualityComparator<Object> cmp) protected boolean__insertEquivalentWithCapability(AtomicReference<Thread> mutator, K key, EqualityComparator<Object> cmp) protected boolean__insertWithCapability(AtomicReference<Thread> mutator, K key) boolean__removeAll(Set<? extends K> set) boolean__removeAllEquivalent(Set<? extends K> set, EqualityComparator<Object> cmp) protected boolean__removeEquivalentWithCapability(AtomicReference<Thread> mutator, K key, EqualityComparator<Object> cmp) protected boolean__removeWithCapability(AtomicReference<Thread> mutator, K key) boolean__retainAll(Set<? extends K> set) boolean__retainAllEquivalent(Set.Transient<? extends K> transientSet, EqualityComparator<Object> cmp) booleanbooleanaddAll(Collection<? extends K> c) private booleancheckHashCodeAndSize(int targetHash, int targetSize) voidclear()booleanbooleancontainsAll(Collection<?> c) booleancontainsAllEquivalent(Collection<?> c, EqualityComparator<Object> cmp) booleancontainsEquivalent(Object o, EqualityComparator<Object> cmp) booleanbooleanequivalent(Object other, EqualityComparator<Object> cmp) getEquivalent(Object o, EqualityComparator<Object> cmp) inthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliteratorMethods inherited from interface io.usethesource.capsule.Set.Transient
__insert, __remove, freezeMethods inherited from interface io.usethesource.capsule.SetEq.Transient
__insertEquivalent, __removeEquivalent
-
Field Details
-
rootNode
-
cachedHashCode
protected int cachedHashCode -
cachedSize
protected int cachedSize
-
-
Constructor Details
-
AbstractTransientTrieSet
AbstractTransientTrieSet(PersistentTrieSet<K> trieSet)
-
-
Method Details
-
checkHashCodeAndSize
private boolean checkHashCodeAndSize(int targetHash, int targetSize) -
add
-
addAll
-
clear
public void clear() -
remove
-
removeAll
-
retainAll
-
contains
-
containsEquivalent
- Specified by:
containsEquivalentin interfaceSetEq<K>
-
get
-
getEquivalent
- Specified by:
getEquivalentin interfaceSetEq<K>
-
__insertWithCapability
-
__insertEquivalentWithCapability
protected boolean __insertEquivalentWithCapability(AtomicReference<Thread> mutator, K key, EqualityComparator<Object> cmp) -
__insertAll
- Specified by:
__insertAllin interfaceSet.Transient<K>
-
__insertAllEquivalent
- Specified by:
__insertAllEquivalentin interfaceSetEq.Transient<K>
-
__removeWithCapability
-
__removeEquivalentWithCapability
protected boolean __removeEquivalentWithCapability(AtomicReference<Thread> mutator, K key, EqualityComparator<Object> cmp) -
__removeAll
- Specified by:
__removeAllin interfaceSet.Transient<K>
-
__removeAllEquivalent
- Specified by:
__removeAllEquivalentin interfaceSetEq.Transient<K>
-
__retainAll
- Specified by:
__retainAllin interfaceSet.Transient<K>
-
__retainAllEquivalent
public boolean __retainAllEquivalent(Set.Transient<? extends K> transientSet, EqualityComparator<Object> cmp) - Specified by:
__retainAllEquivalentin interfaceSetEq.Transient<K>
-
containsAll
- Specified by:
containsAllin interfaceCollection<K>- Specified by:
containsAllin interfaceSet<K>- Specified by:
containsAllin interfaceSet<K>
-
containsAllEquivalent
- Specified by:
containsAllEquivalentin interfaceSetEq<K>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
iterator
-
keyIterator
- Specified by:
keyIteratorin interfaceSet<K>
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
equals
-
equivalent
- Specified by:
equivalentin interfaceSetEq<K>
-
hashCode
public int hashCode()
-