N - numeric operand typepublic abstract class AbstractNumericOperandParser<N> extends AbstractOperandParser<NumericOperand>
| Modifier and Type | Field and Description |
|---|---|
static String |
EQUALS_VALUE |
static String |
GREATER_THAN_VALUE |
static String |
LESS_THAN_VALUE |
AND_BIT, AND_BIT_VALUE, END_OF_LIST, END_OF_LIST_VALUE, LENGTH_SHIFT, OPERAND_LENGTH| Constructor and Description |
|---|
AbstractNumericOperandParser() |
| Modifier and Type | Method and Description |
|---|---|
NumericOperand |
create(Set<String> operandValues)
Creates operand from a set of operand values.
|
NumericOperand |
parse(byte operand)
Parses operand from byte value.
|
protected abstract <T extends N> |
serialize(List<T> list,
io.netty.buffer.ByteBuf nlriByteBuf)
Serializes specific numeric operand type depending on the length field value.
|
void |
serialize(NumericOperand operand,
int length,
boolean endOfList,
io.netty.buffer.ByteBuf buffer)
Serializes operand to bytes.
|
protected abstract <T extends N> |
toString(List<T> list) |
String |
toString(NumericOperand operand,
boolean isFirst)
Creates a string representation of the operand.
|
parseLengthpublic static final String EQUALS_VALUE
public static final String GREATER_THAN_VALUE
public static final String LESS_THAN_VALUE
protected abstract <T extends N> void serialize(List<T> list, io.netty.buffer.ByteBuf nlriByteBuf)
list - of operands to be serializednlriByteBuf - where the operands will be serializedpublic final NumericOperand create(Set<String> operandValues)
AbstractOperandParsercreate in class AbstractOperandParser<NumericOperand>operandValues - set of operand valuespublic final void serialize(NumericOperand operand, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer)
AbstractOperandParserserialize in class AbstractOperandParser<NumericOperand>operand - 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 topublic final NumericOperand parse(byte operand)
AbstractOperandParserparse in class AbstractOperandParser<NumericOperand>operand - byte representation of an operandpublic String toString(NumericOperand operand, boolean isFirst)
AbstractOperandParsertoString in class AbstractOperandParser<NumericOperand>operand - operandisFirst - true if this operand is the first in list of operandsCopyright © 2019 OpenDaylight. All rights reserved.