Class BitmaskOperandParser
- java.lang.Object
 - 
- org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser<BitmaskOperand>
 - 
- org.opendaylight.protocol.bgp.flowspec.handlers.BitmaskOperandParser
 
 
 
- 
public final class BitmaskOperandParser extends AbstractOperandParser<BitmaskOperand>
Parser class for BitmaskOperand. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static BitmaskOperandParserINSTANCEstatic StringMATCH_VALUEstatic StringNOT_VALUE- 
Fields 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 
 - 
 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitmaskOperandcreate(Set<String> opValues)Creates operand from a set of operand values.BitmaskOperandparse(byte op)Parses operand from byte value.voidserialize(BitmaskOperand op, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer)Serializes operand to bytes.StringtoString(BitmaskOperand op, boolean isFirst)Creates a string representation of the operand.- 
Methods inherited from class org.opendaylight.protocol.bgp.flowspec.handlers.AbstractOperandParser
parseLength 
 - 
 
 - 
 
- 
- 
Field Detail
- 
INSTANCE
public static final BitmaskOperandParser INSTANCE
 
- 
MATCH_VALUE
public static final String MATCH_VALUE
- See Also:
 - Constant Field Values
 
 
- 
NOT_VALUE
public static final String NOT_VALUE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
create
public BitmaskOperand create(Set<String> opValues)
Description copied from class:AbstractOperandParserCreates operand from a set of operand values.- Specified by:
 createin classAbstractOperandParser<BitmaskOperand>- Parameters:
 opValues- set of operand values- Returns:
 - specific type of operand
 
 
- 
serialize
public void serialize(BitmaskOperand op, int length, boolean endOfList, io.netty.buffer.ByteBuf buffer)
Description copied from class:AbstractOperandParserSerializes operand to bytes.- Specified by:
 serializein classAbstractOperandParser<BitmaskOperand>- Parameters:
 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 to
 
- 
parse
public BitmaskOperand parse(byte op)
Description copied from class:AbstractOperandParserParses operand from byte value.- Specified by:
 parsein classAbstractOperandParser<BitmaskOperand>- Parameters:
 op- byte representation of an operand- Returns:
 - operand object
 
 
- 
toString
public String toString(BitmaskOperand op, boolean isFirst)
Description copied from class:AbstractOperandParserCreates a string representation of the operand. E.g. : 'and does not match'- Specified by:
 toStringin classAbstractOperandParser<BitmaskOperand>- Parameters:
 op- operandisFirst- true if this operand is the first in list of operands- Returns:
 - String representation of the operand
 
 
 - 
 
 -