Class DecimalType

    • Constructor Detail

      • DecimalType

        public DecimalType()
      • DecimalType

        public DecimalType​(BigDecimal value)
      • DecimalType

        public DecimalType​(long value)
      • DecimalType

        public DecimalType​(double value)
      • DecimalType

        public DecimalType​(String value)
    • Method Detail

      • toFullString

        public String toFullString()
        Description copied from interface: Type
        Get a string representation that contains the whole internal representation of the type.

        The returned string could be consumed by the static 'valueOf(String)' method of the respective type to build a new type that is equal to this type.

        Specified by:
        toFullString in interface Type
        Returns:
        a full string representation of the type to be consumed by 'valueOf(String)'
      • format

        public String format​(String pattern)
        Description copied from interface: Type
        Formats the value of this type according to a pattern (see Formatter).
        Specified by:
        format in interface Type
        Parameters:
        pattern - the pattern to use
        Returns:
        the formatted string
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(@Nullable Object obj)
        Overrides:
        equals in class Object
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in class Number
      • floatValue

        public float floatValue()
        Specified by:
        floatValue in class Number
      • intValue

        public int intValue()
        Specified by:
        intValue in class Number
      • longValue

        public long longValue()
        Specified by:
        longValue in class Number
      • defaultConversion

        protected <T extends State> @Nullable T defaultConversion​(@Nullable Class<T> target)
      • as

        public <T extends State> @Nullable T as​(@Nullable Class<T> target)
        Description copied from interface: State
        Convert this State's value into another type
        Specified by:
        as in interface State
        Parameters:
        target - the desired State type
        Returns:
        the State's value in the given type's representation, or null if the conversion was not possible