Class AbstractIntegerStringCodec<N extends Number & Comparable<N>,T extends RangeRestrictedTypeDefinition<T,N>>
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.AbstractIllegalArgumentCodec<String,T>
-
- org.opendaylight.yangtools.yang.data.impl.codec.AbstractDataStringCodec<J>
-
- 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
-
Methods inherited from class org.opendaylight.yangtools.yang.data.impl.codec.TypeDefinitionAwareCodec
from, fromType, getInputClass, getTypeDefinition
-
Methods inherited from class org.opendaylight.yangtools.concepts.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.concepts.IllegalArgumentCodec
deserialize, serialize
-
-
-
-
Method Detail
-
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
protected final N deserializeImpl(String product)
- Specified by:
deserializeImpl
in classAbstractIllegalArgumentCodec<String,N extends Number & Comparable<N>>
-
serializeImpl
protected final String serializeImpl(N input)
- Specified by:
serializeImpl
in classAbstractIllegalArgumentCodec<String,N extends Number & Comparable<N>>
-
deserialize
protected abstract @NonNull N deserialize(@NonNull String stringRepresentation, int radix)
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.
-
extractRange
protected static <N extends Number & Comparable<N>> Optional<RangeConstraint<N>> extractRange(RangeRestrictedTypeDefinition<?,N> type)
-
-