T
- canonical value type@Beta @NonNullByDefault public interface CanonicalValueSupport<T extends CanonicalValue<T>> extends CanonicalValueValidator<T,T>
CanonicalValue
subclasses. An implementation of this interface must be registered
in the system and be available from each CanonicalValue object.
Note: never implement this interface directly, subclass AbstractCanonicalValueSupport
instead.
This interface allows a CanonicalValue
to be instantiated from a String. The implementation is expected
to perform all checks implied by the corresponding YANG data model.
Modifier and Type | Method and Description |
---|---|
default Variant<T,CanonicalValueViolation> |
fromCanonicalString(String str)
Create a instance for the canonical string representation.
|
Variant<T,CanonicalValueViolation> |
fromString(String str)
Create a instance for a string representation.
|
default <X extends CanonicalValue<X>> |
unsafe()
Unsafe cast to a factory type.
|
getRepresentationClass, getValidatedRepresentationClass, validateRepresentation, validateRepresentation
Variant<T,CanonicalValueViolation> fromString(String str)
str
- String representationCanonicalValue
instance or CanonicalValueViolation if str
does not conformNullPointerException
- if str
is nulldefault Variant<T,CanonicalValueViolation> fromCanonicalString(String str)
str
- String representationCanonicalValue
instance or CanonicalValueViolation if str
does not conformNullPointerException
- if str
is nulldefault <X extends CanonicalValue<X>> CanonicalValueSupport<X> unsafe()
Copyright © 2020 OpenDaylight. All rights reserved.