Interface DataType

  • All Known Implementing Classes:
    NonNegativeInteger, Port, PositiveInteger, PrimitiveDataType

    @Contract
    public interface DataType
    Denotes the type of the data a particular config element (attribute, element) should have. This interface should be implemented whenever a need arises to check if an abstract data type can be represented as a given String . The implementations of a DataType are mapped by their names elsewhere. Implementations should provide functional implementation of the #validate method and must have a public parameterless constructor (except possibly for primitives).
    Since:
    hk2 0.3.10
    Author:
    केदार ([email protected])
    See Also:
    PrimitiveDataType, WriteableView
    • Method Detail

      • validate

        void validate​(String value)
               throws ValidationException
        Checks if given value can be had by the abstract data type represented by this implementation.
        Parameters:
        value - String representing the value for this DataType
        Throws:
        ValidationException - if given String does not represent this data type.