public class NxmHeader extends Object
Constructor and Description |
---|
NxmHeader(BigInteger header)
Builds a
NxmHeader from a BigInteger representation,
that is, one for which BigInteger.longValue() produces
a valid long representation. |
NxmHeader(int nxmField,
boolean hasMask,
int length,
long experimenterId)
Build a experimenter header from it's constituent fields.
|
NxmHeader(int oxmClass,
int nxmField,
boolean hasMask,
int length)
Build a non experimenter header from it's constituent fields.
|
NxmHeader(long header)
Builds a
NxmHeader from a long representation. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getExperimenterId() |
int |
getLength() |
int |
getNxmField() |
int |
getOxmClass() |
int |
hashCode() |
boolean |
isExperimenter() |
static boolean |
isExperimenter(BigInteger bigInteger) |
boolean |
isHasMask() |
BigInteger |
toBigInteger()
Returns the
BigInteger representation of the header. |
long |
toLong()
Returns the
long representation of the header. |
String |
toString() |
public NxmHeader(BigInteger header)
NxmHeader
from a BigInteger
representation,
that is, one for which BigInteger.longValue()
produces
a valid long representation.header
- the header as BigInteger
.NxmHeader(long)
public NxmHeader(long header)
NxmHeader
from a long
representation.
For non experimenter, the 4 byte header are the least
significant of the long, being the other 4 most significant
bytes 0. For experimenter, the full 8 byte constitute the header,
being the 4 least significant the experimenter id.header
- the header as a long
.public NxmHeader(int oxmClass, int nxmField, boolean hasMask, int length)
oxmClass
- the OXM class.nxmField
- the NXM field.hasMask
- the hasMask field.length
- the length field.public NxmHeader(int nxmField, boolean hasMask, int length, long experimenterId)
nxmField
- the NXM field.hasMask
- the hasMask field.length
- the length field.experimenterId
- the esperimenter id field.public BigInteger toBigInteger()
BigInteger
representation of the header.NxmHeader(BigInteger)
public long toLong()
long
representation of the header.NxmHeader(long)
public int getOxmClass()
public int getNxmField()
public boolean isHasMask()
public int getLength()
public long getExperimenterId()
public boolean isExperimenter()
public static boolean isExperimenter(BigInteger bigInteger)
Copyright © 2020 OpenDaylight. All rights reserved.