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
forString(String str)
Create anObjectIdentifier
from its string representation.int[]
getSubIdentifiers()
int
hashCode()
static ObjectIdentifier
of(int... subIdentifiers)
Create anObjectIdentifier
from its integer components.static ObjectIdentifier
readFrom(DataInput in)
Read anObjectIdentifier
from a DataInput, performing the inverse ofwriteTo(DataOutput)
.IntStream
streamSubIdentifiers()
String
toString()
void
writeTo(DataOutput out)
Serialize this object into aDataOutput
as a fixed-format stream.
-
-
-
Method Detail
-
of
public static ObjectIdentifier of(int... subIdentifiers)
Create anObjectIdentifier
from its integer components. Each sub-identifier is interpreted as an unsigned integer.- Parameters:
subIdentifiers
- OID sub-identifiers- Returns:
- An ObjectIdentifier.
-
forString
public static ObjectIdentifier forString(String str)
Create anObjectIdentifier
from its string representation.- Parameters:
str
- String OID representation.- Returns:
- An ObjectIdentifier.
-
getSubIdentifiers
public int[] getSubIdentifiers()
-
streamSubIdentifiers
public IntStream streamSubIdentifiers()
-
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
-
-