Package org.onosproject.core
Class DefaultApplicationId
- java.lang.Object
-
- org.onosproject.core.DefaultApplicationId
-
- All Implemented Interfaces:
ApplicationId
public class DefaultApplicationId extends java.lang.Object implements ApplicationId
Application identifier.
-
-
Constructor Summary
Constructors Constructor Description DefaultApplicationId(int id, java.lang.String name)Creates a new application ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()shortid()Returns the application id.java.lang.Stringname()Returns the applications supplied identifier.java.lang.StringtoString()
-
-
-
Method Detail
-
id
public short id()
Description copied from interface:ApplicationIdReturns the application id. This must be non-negative.- Specified by:
idin interfaceApplicationId- Returns:
- a short value
-
name
public java.lang.String name()
Description copied from interface:ApplicationIdReturns the applications supplied identifier.- Specified by:
namein interfaceApplicationId- Returns:
- a string identifier
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-