Package org.onlab.packet
Class VlanId
- java.lang.Object
-
- org.onlab.util.Identifier<java.lang.Short>
-
- org.onlab.packet.VlanId
-
public final class VlanId extends Identifier<java.lang.Short>
Representation of a VLAN identifier.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description short
toShort()
Returns the backing VLAN number.java.lang.String
toString()
Returns a string representation of a DeviceKeyId.static VlanId
vlanId()
Creates a VLAN identifier for untagged VLAN.static VlanId
vlanId(short value)
Creates a VLAN identifier using the supplied VLAN identifier.static VlanId
vlanId(java.lang.String value)
Creates a VLAN identifier Object using the supplied VLAN identifier.-
Methods inherited from class org.onlab.util.Identifier
equals, hashCode, id
-
-
-
-
Field Detail
-
UNTAGGED
public static final short UNTAGGED
- See Also:
- Constant Field Values
-
ANY_VALUE
public static final short ANY_VALUE
- See Also:
- Constant Field Values
-
NO_VID
public static final short NO_VID
- See Also:
- Constant Field Values
-
RESERVED
public static final short RESERVED
- See Also:
- Constant Field Values
-
NONE
public static final VlanId NONE
-
ANY
public static final VlanId ANY
-
MAX_VLAN
public static final short MAX_VLAN
- See Also:
- Constant Field Values
-
-
Method Detail
-
vlanId
public static VlanId vlanId()
Creates a VLAN identifier for untagged VLAN.- Returns:
- VLAN identifier
-
vlanId
public static VlanId vlanId(short value)
Creates a VLAN identifier using the supplied VLAN identifier.- Parameters:
value
- VLAN identifier expressed as short- Returns:
- VLAN identifier
-
vlanId
public static VlanId vlanId(java.lang.String value)
Creates a VLAN identifier Object using the supplied VLAN identifier.- Parameters:
value
- VLAN identifier expressed as string- Returns:
- VLAN identifier
-
toShort
public short toShort()
Returns the backing VLAN number.- Returns:
- VLAN number
-
toString
public java.lang.String toString()
Description copied from class:Identifier
Returns a string representation of a DeviceKeyId.- Overrides:
toString
in classIdentifier<java.lang.Short>
- Returns:
- string
-
-