Package org.onosproject.cluster
Class PartitionId
- java.lang.Object
 - 
- org.onlab.util.Identifier<Integer>
 - 
- org.onosproject.cluster.PartitionId
 
 
 
- 
- All Implemented Interfaces:
 Comparable<PartitionId>
public class PartitionId extends Identifier<Integer> implements Comparable<PartitionId>
Partitionidentifier. 
- 
- 
Field Summary
- 
Fields inherited from class org.onlab.util.Identifier
identifier 
 - 
 
- 
Constructor Summary
Constructors Constructor Description PartitionId(int id)Creates a partition identifier from an integer. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intasInt()Returns the partition identifier as an integer.intcompareTo(PartitionId that)static PartitionIdfrom(int id)Creates a partition identifier from an integer.- 
Methods inherited from class org.onlab.util.Identifier
equals, hashCode, id, toString 
 - 
 
 - 
 
- 
- 
Method Detail
- 
from
public static PartitionId from(int id)
Creates a partition identifier from an integer.- Parameters:
 id- input integer- Returns:
 - partition identification
 
 
- 
asInt
public int asInt()
Returns the partition identifier as an integer.- Returns:
 - number
 
 
- 
compareTo
public int compareTo(PartitionId that)
- Specified by:
 compareToin interfaceComparable<PartitionId>
 
 - 
 
 -