Package net.i2p.router.tunnel.pool
Class ExcluderBase
- java.lang.Object
-
- net.i2p.router.tunnel.pool.ExcluderBase
-
- Direct Known Subclasses:
TunnelPeerSelector.Excluder
abstract class ExcluderBase extends Object implements Set<Hash>
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedExcluderBase(Set<Hash> set)Automatically check if peer is connected and add the Hash to the set if not.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanadd(Hash h)booleanaddAll(Collection<? extends Hash> c)voidclear()abstract booleancontains(Object o)Automatically check if peer is allowed and add the Hash to the set if not.booleancontainsAll(Collection<?> c)booleanequals(Object o)inthashCode()booleanisEmpty()Iterator<Hash>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<Hash> Hash[]toArray(Hash[] a)StringtoString()-
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
-
-
-
-
Method Detail
-
contains
public abstract boolean contains(Object o)
Automatically check if peer is allowed and add the Hash to the set if not.
-
add
public boolean add(Hash h)
-
addAll
public boolean addAll(Collection<? extends Hash> c)
-
clear
public void clear()
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Hash>- Specified by:
containsAllin interfaceSet<Hash>
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
size
public int size()
-
toArray
public Object[] toArray()
-
toArray
public <Hash> Hash[] toArray(Hash[] a)
-
-