public class Masked<T extends OFValueType<T>> extends Object implements OFValueType<Masked<T>>
Modifier and Type | Field and Description |
---|---|
protected T |
mask
bitmask of the value.
|
protected T |
value |
Modifier | Constructor and Description |
---|---|
protected |
Masked(T value,
T mask) |
Modifier and Type | Method and Description |
---|---|
Masked<T> |
applyMask(Masked<T> mask) |
int |
compareTo(Masked<T> o) |
boolean |
equals(Object obj) |
int |
getLength() |
T |
getMask() |
T |
getValue() |
int |
hashCode() |
boolean |
matches(T candidate)
Determine whether candidate value is matched by this masked value
(i.e., does candiate lie in the 'network/range' specified by this masked
value).
|
static <T extends OFValueType<T>> |
of(T value,
T mask) |
void |
putTo(com.google.common.hash.PrimitiveSink sink) |
String |
toString() |
protected final T extends OFValueType<T> value
protected final T extends OFValueType<T> mask
public T getValue()
public T getMask()
public static <T extends OFValueType<T>> Masked<T> of(T value, T mask)
public int getLength()
getLength
in interface OFValueType<Masked<T extends OFValueType<T>>>
public boolean matches(T candidate)
candidate
- the candidate value to testpublic Masked<T> applyMask(Masked<T> mask)
applyMask
in interface OFValueType<Masked<T extends OFValueType<T>>>
public int compareTo(Masked<T> o)
compareTo
in interface Comparable<Masked<T extends OFValueType<T>>>
public void putTo(com.google.common.hash.PrimitiveSink sink)
putTo
in interface PrimitiveSinkable
Copyright © 2015. All rights reserved.