org.jjoost.collections.base
Interface HashStore<N extends HashNode<N>>

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
LockFreeHashStore, LockFreeLinkedHashStore, SegmentedHashStore, SerialHashStore, SerialLinkedHashStore, SynchronizedHashStore

public interface HashStore<N extends HashNode<N>>
extends java.io.Serializable


Method Summary
<NCmp,V> java.util.Iterator<V>
all(Function<? super N,? extends NCmp> nodeEqualityProj, HashNodeEquality<? super NCmp,? super N> nodeEquality, Function<? super N,? extends V> ret)
           
 int capacity()
           
 int clear()
           
<V> java.util.Iterator<V>
clearAndReturn(Function<? super N,? extends V> f)
           
<NCmp> boolean
contains(int hash, NCmp find, HashNodeEquality<? super NCmp,? super N> eq)
           
<NCmp> HashStore<N>
copy(Function<? super N,? extends NCmp> nodeEqualityProj, HashNodeEquality<? super NCmp,? super N> nodeEquality)
           
<NCmp> int
count(int hash, NCmp find, HashNodeEquality<? super NCmp,? super N> eq)
           
<NCmp,V> V
ensureAndGet(int hash, NCmp put, HashNodeEquality<? super NCmp,? super N> eq, HashNodeFactory<? super NCmp,N> factory, Function<? super N,? extends V> ret)
           
<NCmp,NCmp2,V>
java.util.Iterator<V>
find(int hash, NCmp find, HashNodeEquality<? super NCmp,? super N> findEq, Function<? super N,? extends NCmp2> nodeEqualityProj, HashNodeEquality<? super NCmp2,? super N> nodeEq, Function<? super N,? extends V> ret)
           
<NCmp,V> java.util.List<V>
findNow(int hash, NCmp find, HashNodeEquality<? super NCmp,? super N> findEq, Function<? super N,? extends V> ret)
           
<NCmp,V> V
first(int hash, NCmp find, HashNodeEquality<? super NCmp,? super N> eq, Function<? super N,? extends V> ret)
           
 boolean isEmpty()
           
<NCmp,V> V
put(NCmp find, N put, HashNodeEquality<? super NCmp,? super N> eq, Function<? super N,? extends V> ret)
           
<NCmp,V> V
putIfAbsent(int hash, NCmp put, HashNodeEquality<? super NCmp,? super N> eq, HashNodeFactory<? super NCmp,N> factory, Function<? super N,? extends V> ret)
           
<NCmp,V> V
putIfAbsent(NCmp find, N put, HashNodeEquality<? super NCmp,? super N> eq, Function<? super N,? extends V> ret)
           
<NCmp> int
remove(int hash, int removeAtMost, NCmp find, HashNodeEquality<? super NCmp,? super N> eq)
           
<NCmp,V> java.lang.Iterable<V>
removeAndReturn(int hash, int removeAtMost, NCmp find, HashNodeEquality<? super NCmp,? super N> eq, Function<? super N,? extends V> ret)
           
<NCmp,V> V
removeAndReturnFirst(int hash, int removeAtMost, NCmp find, HashNodeEquality<? super NCmp,? super N> eq, Function<? super N,? extends V> ret)
           
<NCmp> boolean
removeNode(Function<? super N,? extends NCmp> nodePrefixEqFunc, HashNodeEquality<? super NCmp,? super N> nodePrefixEq, N n)
           
 void resize(int size)
           
 void shrink()
           
 int totalCount()
           
<NCmp,NCmp2,V>
java.util.Iterator<V>
unique(Function<? super N,? extends NCmp> uniquenessEqualityProj, Equality<? super NCmp> uniquenessEquality, Function<? super N,? extends NCmp2> nodeEqualityProj, HashNodeEquality<? super NCmp2,? super N> nodeEquality, Function<? super N,? extends V> ret)
           
 int uniquePrefixCount()
           
 

Method Detail

totalCount

int totalCount()

uniquePrefixCount

int uniquePrefixCount()

isEmpty

boolean isEmpty()

clear

int clear()

clearAndReturn

<V> java.util.Iterator<V> clearAndReturn(Function<? super N,? extends V> f)

copy

<NCmp> HashStore<N> copy(Function<? super N,? extends NCmp> nodeEqualityProj,
                         HashNodeEquality<? super NCmp,? super N> nodeEquality)

capacity

int capacity()

shrink

void shrink()

resize

void resize(int size)

put

<NCmp,V> V put(NCmp find,
               N put,
               HashNodeEquality<? super NCmp,? super N> eq,
               Function<? super N,? extends V> ret)

putIfAbsent

<NCmp,V> V putIfAbsent(NCmp find,
                       N put,
                       HashNodeEquality<? super NCmp,? super N> eq,
                       Function<? super N,? extends V> ret)

putIfAbsent

<NCmp,V> V putIfAbsent(int hash,
                       NCmp put,
                       HashNodeEquality<? super NCmp,? super N> eq,
                       HashNodeFactory<? super NCmp,N> factory,
                       Function<? super N,? extends V> ret)

ensureAndGet

<NCmp,V> V ensureAndGet(int hash,
                        NCmp put,
                        HashNodeEquality<? super NCmp,? super N> eq,
                        HashNodeFactory<? super NCmp,N> factory,
                        Function<? super N,? extends V> ret)

removeNode

<NCmp> boolean removeNode(Function<? super N,? extends NCmp> nodePrefixEqFunc,
                          HashNodeEquality<? super NCmp,? super N> nodePrefixEq,
                          N n)

remove

<NCmp> int remove(int hash,
                  int removeAtMost,
                  NCmp find,
                  HashNodeEquality<? super NCmp,? super N> eq)

removeAndReturnFirst

<NCmp,V> V removeAndReturnFirst(int hash,
                                int removeAtMost,
                                NCmp find,
                                HashNodeEquality<? super NCmp,? super N> eq,
                                Function<? super N,? extends V> ret)

removeAndReturn

<NCmp,V> java.lang.Iterable<V> removeAndReturn(int hash,
                                               int removeAtMost,
                                               NCmp find,
                                               HashNodeEquality<? super NCmp,? super N> eq,
                                               Function<? super N,? extends V> ret)

contains

<NCmp> boolean contains(int hash,
                        NCmp find,
                        HashNodeEquality<? super NCmp,? super N> eq)

count

<NCmp> int count(int hash,
                 NCmp find,
                 HashNodeEquality<? super NCmp,? super N> eq)

first

<NCmp,V> V first(int hash,
                 NCmp find,
                 HashNodeEquality<? super NCmp,? super N> eq,
                 Function<? super N,? extends V> ret)

findNow

<NCmp,V> java.util.List<V> findNow(int hash,
                                   NCmp find,
                                   HashNodeEquality<? super NCmp,? super N> findEq,
                                   Function<? super N,? extends V> ret)

find

<NCmp,NCmp2,V> java.util.Iterator<V> find(int hash,
                                          NCmp find,
                                          HashNodeEquality<? super NCmp,? super N> findEq,
                                          Function<? super N,? extends NCmp2> nodeEqualityProj,
                                          HashNodeEquality<? super NCmp2,? super N> nodeEq,
                                          Function<? super N,? extends V> ret)

all

<NCmp,V> java.util.Iterator<V> all(Function<? super N,? extends NCmp> nodeEqualityProj,
                                   HashNodeEquality<? super NCmp,? super N> nodeEquality,
                                   Function<? super N,? extends V> ret)

unique

<NCmp,NCmp2,V> java.util.Iterator<V> unique(Function<? super N,? extends NCmp> uniquenessEqualityProj,
                                            Equality<? super NCmp> uniquenessEquality,
                                            Function<? super N,? extends NCmp2> nodeEqualityProj,
                                            HashNodeEquality<? super NCmp2,? super N> nodeEquality,
                                            Function<? super N,? extends V> ret)