Package org.wildfly.common.net
Class CidrAddressTable<T>
java.lang.Object
org.wildfly.common.net.CidrAddressTable<T>
- All Implemented Interfaces:
Iterable<CidrAddressTable.Mapping<T>>
public final class CidrAddressTable<T>
extends Object
implements Iterable<CidrAddressTable.Mapping<T>>
A table for mapping IP addresses to objects using
CidrAddress instances for matching.- Author:
- David M. Lloyd
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA single mapping in the table. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()get(InetAddress address) getOrDefault(InetAddress address, T defVal) booleanisEmpty()iterator()put(CidrAddress block, T value) putIfAbsent(CidrAddress block, T value) removeExact(CidrAddress block) booleanremoveExact(CidrAddress block, T expect) replaceExact(CidrAddress block, T value) booleanreplaceExact(CidrAddress block, T expect, T update) intsize()toString()
-
Constructor Details
-
CidrAddressTable
public CidrAddressTable()
-
-
Method Details
-
getOrDefault
-
get
-
put
-
putIfAbsent
-
replaceExact
-
replaceExact
-
removeExact
-
removeExact
-
clear
public void clear() -
size
public int size() -
isEmpty
public boolean isEmpty() -
clone
-
iterator
-
spliterator
- Specified by:
spliteratorin interfaceIterable<T>
-
toString
-