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
-
Constructor Summary
ModifierConstructorDescriptionprotected
ExcluderBase
(Set<Hash> set) Automatically check if peer is connected and add the Hash to the set if not. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends Hash> c) void
clear()
abstract boolean
Automatically check if peer is allowed and add the Hash to the set if not.boolean
containsAll
(Collection<?> c) boolean
int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<Hash> Hash[]
toArray
(Hash[] a) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
containsAll
in interfaceCollection<Hash>
- Specified by:
containsAll
in 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
-