Class AbstractNumericOperandParser<N>
java.lang.Object
org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser<NumericOperand>
org.opendaylight.protocol.bgp.flowspec.handlers.AbstractNumericOperandParser<N>
- Type Parameters:
 N- numeric operand type
- Direct Known Subclasses:
 NumericOneByteOperandParser,NumericTwoByteOperandParser
Common parent class for numeric operands.
- 
Field Summary
FieldsFields inherited from class org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser
AND_BIT, AND_BIT_VALUE, END_OF_LIST, END_OF_LIST_VALUE, LENGTH_SHIFT, OPERAND_LENGTH - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionfinal NumericOperandCreates operand from a set of operand values.final NumericOperandparse(byte operand) Parses operand from byte value.protected abstract <T extends N>
voidSerializes specific numeric operand type depending on the length field value.final voidserialize(NumericOperand operand, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer) Serializes operand to bytes.toString(NumericOperand operand, boolean isFirst) Creates a string representation of the operand.Methods inherited from class org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser
parseLength 
- 
Field Details
- 
EQUALS_VALUE
- See Also:
 
 - 
GREATER_THAN_VALUE
- See Also:
 
 - 
LESS_THAN_VALUE
- See Also:
 
 
 - 
 - 
Constructor Details
- 
AbstractNumericOperandParser
public AbstractNumericOperandParser() 
 - 
 - 
Method Details
- 
create
Description copied from class:AbstractOperandParserCreates operand from a set of operand values.- Specified by:
 createin classAbstractOperandParser<NumericOperand>- Parameters:
 operandValues- set of operand values- Returns:
 - specific type of operand
 
 - 
serialize
public final void serialize(NumericOperand operand, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer) Description copied from class:AbstractOperandParserSerializes operand to bytes.- Specified by:
 serializein classAbstractOperandParser<NumericOperand>- Parameters:
 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 to
 - 
serialize
Serializes specific numeric operand type depending on the length field value.- Parameters:
 list- of operands to be serializednlriByteBuf- where the operands will be serialized
 - 
parse
Description copied from class:AbstractOperandParserParses operand from byte value.- Specified by:
 parsein classAbstractOperandParser<NumericOperand>- Parameters:
 operand- byte representation of an operand- Returns:
 - operand object
 
 - 
toString
Description copied from class:AbstractOperandParserCreates a string representation of the operand. E.g. : 'and does not match'- Specified by:
 toStringin classAbstractOperandParser<NumericOperand>- Parameters:
 operand- operandisFirst- true if this operand is the first in list of operands- Returns:
 - String representation of the operand
 
 - 
toString
 
 -