Class AbstractIntegerStringCodec<N extends Number & Comparable<N>,T extends RangeRestrictedTypeDefinition<T,N>>
java.lang.Object
org.opendaylight.yangtools.yang.data.api.codec.AbstractIllegalArgumentCodec<String,N>
org.opendaylight.yangtools.yang.data.impl.codec.AbstractDataStringCodec<N>
org.opendaylight.yangtools.yang.data.impl.codec.TypeDefinitionAwareCodec<N,T>
org.opendaylight.yangtools.yang.data.impl.codec.AbstractIntegerStringCodec<N,T>
- All Implemented Interfaces:
IllegalArgumentCodec<String,
,N> DataStringCodec<N>
@Beta
public abstract class AbstractIntegerStringCodec<N extends Number & Comparable<N>,T extends RangeRestrictedTypeDefinition<T,N>>
extends TypeDefinitionAwareCodec<N,T>
Do not use this class outside of yangtools, its presence does not fall into the API stability contract.
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @NonNull N
deserialize
(@NonNull String stringRepresentation, int radix) Deserializes value from supplied string representation is supplied radix.protected final N
deserializeImpl
(String product) static @NonNull AbstractIntegerStringCodec
<Short, Int16TypeDefinition> from
(Int16TypeDefinition type) static @NonNull AbstractIntegerStringCodec
<Integer, Int32TypeDefinition> from
(Int32TypeDefinition type) static @NonNull AbstractIntegerStringCodec
<Long, Int64TypeDefinition> from
(Int64TypeDefinition type) static @NonNull AbstractIntegerStringCodec
<Byte, Int8TypeDefinition> from
(Int8TypeDefinition type) static @NonNull AbstractIntegerStringCodec
<Uint16, Uint16TypeDefinition> from
(Uint16TypeDefinition type) static @NonNull AbstractIntegerStringCodec
<Uint32, Uint32TypeDefinition> from
(Uint32TypeDefinition type) static @NonNull AbstractIntegerStringCodec
<Uint64, Uint64TypeDefinition> from
(Uint64TypeDefinition type) static @NonNull AbstractIntegerStringCodec
<Uint8, Uint8TypeDefinition> from
(Uint8TypeDefinition type) protected final String
serializeImpl
(N input) Methods inherited from class org.opendaylight.yangtools.yang.data.impl.codec.TypeDefinitionAwareCodec
from, fromType, getInputClass, typeDefinition
Methods inherited from class org.opendaylight.yangtools.yang.data.api.codec.AbstractIllegalArgumentCodec
deserialize, serialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.yang.data.api.codec.IllegalArgumentCodec
deserialize, serialize
-
Method Details
-
from
public static @NonNull AbstractIntegerStringCodec<Byte,Int8TypeDefinition> from(Int8TypeDefinition type) -
from
public static @NonNull AbstractIntegerStringCodec<Short,Int16TypeDefinition> from(Int16TypeDefinition type) -
from
public static @NonNull AbstractIntegerStringCodec<Integer,Int32TypeDefinition> from(Int32TypeDefinition type) -
from
public static @NonNull AbstractIntegerStringCodec<Long,Int64TypeDefinition> from(Int64TypeDefinition type) -
from
public static @NonNull AbstractIntegerStringCodec<Uint8,Uint8TypeDefinition> from(Uint8TypeDefinition type) -
from
public static @NonNull AbstractIntegerStringCodec<Uint16,Uint16TypeDefinition> from(Uint16TypeDefinition type) -
from
public static @NonNull AbstractIntegerStringCodec<Uint32,Uint32TypeDefinition> from(Uint32TypeDefinition type) -
from
public static @NonNull AbstractIntegerStringCodec<Uint64,Uint64TypeDefinition> from(Uint64TypeDefinition type) -
deserializeImpl
- Specified by:
deserializeImpl
in classAbstractIllegalArgumentCodec<String,
N extends Number & Comparable<N>>
-
serializeImpl
- Specified by:
serializeImpl
in classAbstractIllegalArgumentCodec<String,
N extends Number & Comparable<N>>
-
deserialize
Deserializes value from supplied string representation is supplied radix. SeeInteger.parseInt(String, int)
for in-depth description about string and radix relationship.- Parameters:
stringRepresentation
- String representationradix
- numeric base.- Returns:
- Deserialized value.
-