Class ObjectIdentifier
- java.lang.Object
-
- org.opendaylight.yangtools.rfc6643.model.api.ObjectIdentifier
-
- All Implemented Interfaces:
Serializable
,Identifier
,Immutable
,MutationBehaviour<Immutable>
,WritableObject
@Beta public final class ObjectIdentifier extends Object implements Identifier, WritableObject
An OID, or ObjectIdentifier, as defined by ITU and ISO/IEC.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static ObjectIdentifier
forComponents(int... components)
Create anObjectIdentifier
from its integer components.static ObjectIdentifier
forString(String str)
Create anObjectIdentifier
from its string representation.int[]
getComponents()
int
hashCode()
static ObjectIdentifier
readFrom(DataInput in)
Read anObjectIdentifier
from a DataInput, performing the inverse ofwriteTo(DataOutput)
.IntStream
streamComponents()
String
toString()
void
writeTo(DataOutput out)
Serialize this object into aDataOutput
as a fixed-format stream.
-
-
-
Method Detail
-
forComponents
public static ObjectIdentifier forComponents(int... components)
Create anObjectIdentifier
from its integer components.- Parameters:
components
- OID items- Returns:
- An ObjectIdentifier.
-
forString
public static ObjectIdentifier forString(String str)
Create anObjectIdentifier
from its string representation.- Parameters:
str
- String OID representation.- Returns:
- An ObjectIdentifier.
-
getComponents
public int[] getComponents()
-
streamComponents
public IntStream streamComponents()
-
readFrom
public static ObjectIdentifier readFrom(DataInput in) throws IOException
Read anObjectIdentifier
from a DataInput, performing the inverse ofwriteTo(DataOutput)
. For details seeWritableObject
.- Parameters:
in
- Data input- Returns:
- Object identifier
- Throws:
IOException
- If an I/O error is reported
-
writeTo
public void writeTo(DataOutput out) throws IOException
Description copied from interface:WritableObject
Serialize this object into aDataOutput
as a fixed-format stream.- Specified by:
writeTo
in interfaceWritableObject
- Parameters:
out
- Data output- Throws:
IOException
- if an I/O error occurs
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceIdentifier
- Overrides:
hashCode
in classObject
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceIdentifier
- Overrides:
equals
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceIdentifier
- Overrides:
toString
in classObject
-
-