public final class XInetAddressPoint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.net.InetAddress |
MAX_VALUE
The maximum value that an ip address can hold.
|
static java.net.InetAddress |
MIN_VALUE
The minimum value that an ip address can hold.
|
Modifier and Type | Method and Description |
---|---|
static org.apache.lucene.search.Query |
newPrefixQuery(java.lang.String field,
java.net.InetAddress value,
int prefixLength)
Create a prefix query for matching a CIDR network range.
|
static java.net.InetAddress |
nextDown(java.net.InetAddress address)
Return the
InetAddress that compares immediately less than
address . |
static java.net.InetAddress |
nextUp(java.net.InetAddress address)
Return the
InetAddress that compares immediately greater than
address . |
public static final java.net.InetAddress MIN_VALUE
public static final java.net.InetAddress MAX_VALUE
public static java.net.InetAddress nextUp(java.net.InetAddress address)
InetAddress
that compares immediately greater than
address
.java.lang.ArithmeticException
- if the provided address is the
maximum ip address
public static java.net.InetAddress nextDown(java.net.InetAddress address)
InetAddress
that compares immediately less than
address
.java.lang.ArithmeticException
- if the provided address is the
minimum ip address
public static org.apache.lucene.search.Query newPrefixQuery(java.lang.String field, java.net.InetAddress value, int prefixLength)
field
- field name. must not be null
.value
- any host addressprefixLength
- the network prefix length for this address. This is also known as the subnet mask in the context of IPv4
addresses.java.lang.IllegalArgumentException
- if field
is null, or prefixLength is invalid.