Package net.i2p.router.tunnel.pool
Class ExcluderBase
java.lang.Object
net.i2p.router.tunnel.pool.ExcluderBase
- Direct Known Subclasses:
TunnelPeerSelector.Excluder
A Set of Hashes that automatically adds to the
Set in the contains() check.
So we don't need to generate the exclude set up front.
Less object churn and copying.
- Since:
- 0.9.58
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExcluderBase(Set<Hash> set) Automatically check if peer is connected and add the Hash to the set if not. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Hash> c) voidclear()abstract booleanAutomatically check if peer is allowed and add the Hash to the set if not.booleancontainsAll(Collection<?> c) booleaninthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<Hash> Hash[]toArray(Hash[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Field Details
-
s
-
-
Constructor Details
-
ExcluderBase
Automatically check if peer is connected and add the Hash to the set if not.- Parameters:
set- not copied, contents will be modified by all methods
-
-
Method Details
-
contains
Automatically check if peer is allowed and add the Hash to the set if not. -
add
-
addAll
-
clear
public void clear() -
containsAll
- Specified by:
containsAllin interfaceCollection<Hash>- Specified by:
containsAllin interfaceSet<Hash>
-
equals
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
iterator
-
remove
-
removeAll
-
retainAll
-
size
public int size() -
toArray
-
toArray
public <Hash> Hash[] toArray(Hash[] a) -
toString
-