Package net.i2p.router.util
Class MaskedIPSet
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<String>
,Collection<String>
,Set<String>
Used for detection of routers with matching IPs or family.
Moved out of ProfileOrganizer for use in netdb also.
- Since:
- 0.9.28
- See Also:
-
Constructor Summary
ConstructorDescriptionMaskedIPSet
(int initialCapacity) MaskedIPSet
(RouterContext ctx, Hash peer, int mask) The Set of IPs for this peer, with a given mask.MaskedIPSet
(RouterContext ctx, Hash peer, RouterInfo pinfo, int mask) The Set of IPs for this peer, with a given mask.MaskedIPSet
(RouterContext ctx, RouterInfo pinfo, int mask) The Set of IPs for this peer, with a given mask. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsAny
(Set<String> b) does this contain any of the elements in b?Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, newHashSet, remove, size, spliterator, toArray, toArray
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
MaskedIPSet
public MaskedIPSet() -
MaskedIPSet
public MaskedIPSet(int initialCapacity) -
MaskedIPSet
The Set of IPs for this peer, with a given mask. Includes the comm system's record of the IP, and all netDb addresses. As of 0.9.24, returned set will include netdb family as well. This gets the peer from the netdb without validation, for efficiency and to avoid deadlocks. Peers are presumed to be validated elsewhere.- Parameters:
peer
- non-nullmask
- is 1-4 (number of bytes to match)
-
MaskedIPSet
The Set of IPs for this peer, with a given mask. Includes the comm system's record of the IP, and all netDb addresses. As of 0.9.24, returned set will include netdb family as well.- Parameters:
pinfo
- may be nullmask
- is 1-4 (number of bytes to match)
-
MaskedIPSet
The Set of IPs for this peer, with a given mask. Includes the comm system's record of the IP, and all netDb addresses. As of 0.9.24, returned set will include netdb family as well.- Parameters:
pinfo
- may be nullmask
- is 1-4 (number of bytes to match)
-
-
Method Details
-
containsAny
does this contain any of the elements in b?
-