static final class PersistentHashMap.ArrayNode extends java.lang.Object implements PersistentHashMap.INode
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PersistentHashMap.ArrayNode.Seq |
Modifier and Type | Field and Description |
---|---|
(package private) PersistentHashMap.INode[] |
array |
(package private) int |
count |
(package private) java.util.concurrent.atomic.AtomicReference<java.lang.Thread> |
edit |
Constructor and Description |
---|
PersistentHashMap.ArrayNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit,
int count,
PersistentHashMap.INode[] array) |
Modifier and Type | Method and Description |
---|---|
PersistentHashMap.INode |
assoc(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit,
int shift,
int hash,
java.lang.Object key,
java.lang.Object val,
Box addedLeaf) |
PersistentHashMap.INode |
assoc(int shift,
int hash,
java.lang.Object key,
java.lang.Object val,
Box addedLeaf) |
private PersistentHashMap.ArrayNode |
editAndSet(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit,
int i,
PersistentHashMap.INode n) |
private PersistentHashMap.ArrayNode |
ensureEditable(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit) |
IMapEntry |
find(int shift,
int hash,
java.lang.Object key) |
java.lang.Object |
find(int shift,
int hash,
java.lang.Object key,
java.lang.Object notFound) |
java.lang.Object |
fold(IFn combinef,
IFn reducef,
IFn fjtask,
IFn fjfork,
IFn fjjoin) |
static java.lang.Object |
foldTasks(java.util.List<java.util.concurrent.Callable> tasks,
IFn combinef,
IFn fjtask,
IFn fjfork,
IFn fjjoin) |
java.lang.Object |
kvreduce(IFn f,
java.lang.Object init) |
ISeq |
nodeSeq() |
private PersistentHashMap.INode |
pack(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit,
int idx) |
PersistentHashMap.INode |
without(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit,
int shift,
int hash,
java.lang.Object key,
Box removedLeaf) |
PersistentHashMap.INode |
without(int shift,
int hash,
java.lang.Object key) |
int count
final PersistentHashMap.INode[] array
final java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit
PersistentHashMap.ArrayNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit, int count, PersistentHashMap.INode[] array)
public PersistentHashMap.INode assoc(int shift, int hash, java.lang.Object key, java.lang.Object val, Box addedLeaf)
assoc
in interface PersistentHashMap.INode
public PersistentHashMap.INode without(int shift, int hash, java.lang.Object key)
without
in interface PersistentHashMap.INode
public IMapEntry find(int shift, int hash, java.lang.Object key)
find
in interface PersistentHashMap.INode
public java.lang.Object find(int shift, int hash, java.lang.Object key, java.lang.Object notFound)
find
in interface PersistentHashMap.INode
public ISeq nodeSeq()
nodeSeq
in interface PersistentHashMap.INode
public java.lang.Object kvreduce(IFn f, java.lang.Object init)
kvreduce
in interface PersistentHashMap.INode
public java.lang.Object fold(IFn combinef, IFn reducef, IFn fjtask, IFn fjfork, IFn fjjoin)
fold
in interface PersistentHashMap.INode
public static java.lang.Object foldTasks(java.util.List<java.util.concurrent.Callable> tasks, IFn combinef, IFn fjtask, IFn fjfork, IFn fjjoin)
private PersistentHashMap.ArrayNode ensureEditable(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit)
private PersistentHashMap.ArrayNode editAndSet(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit, int i, PersistentHashMap.INode n)
private PersistentHashMap.INode pack(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit, int idx)
public PersistentHashMap.INode assoc(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit, int shift, int hash, java.lang.Object key, java.lang.Object val, Box addedLeaf)
assoc
in interface PersistentHashMap.INode
public PersistentHashMap.INode without(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> edit, int shift, int hash, java.lang.Object key, Box removedLeaf)
without
in interface PersistentHashMap.INode