T
- operand Typepublic abstract class AbstractOperandParser<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
AND_BIT |
static String |
AND_BIT_VALUE |
protected static int |
END_OF_LIST |
static String |
END_OF_LIST_VALUE |
protected static int |
LENGTH_SHIFT |
protected static int |
OPERAND_LENGTH |
Constructor and Description |
---|
AbstractOperandParser() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
create(Set<String> opValues)
Creates operand from a set of operand values.
|
protected abstract T |
parse(byte op)
Parses operand from byte value.
|
static short |
parseLength(byte op) |
protected abstract void |
serialize(T op,
int length,
boolean endOfList,
io.netty.buffer.ByteBuf buffer)
Serializes operand to bytes.
|
protected abstract String |
toString(T op,
boolean isFirst)
Creates a string representation of the operand.
|
public static final String AND_BIT_VALUE
public static final String END_OF_LIST_VALUE
protected static final int OPERAND_LENGTH
protected static final int END_OF_LIST
protected static final int AND_BIT
protected static final int LENGTH_SHIFT
public static short parseLength(byte op)
protected abstract T create(Set<String> opValues)
opValues
- set of operand valuesprotected abstract void serialize(T op, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer)
op
- operand to be serializedlength
- value of the 'length' fieldendOfList
- if this operand is at the end of the listbuffer
- where the operand will be serialized toprotected abstract T parse(byte op)
op
- byte representation of an operandCopyright © 2019 OpenDaylight. All rights reserved.