Class MapBackedDouble


  • public class MapBackedDouble
    extends MapBackedProperty<java.lang.Double>
    A Double variable that can be represented as a key-value pair in the POJO internal Map
    • Constructor Summary

      Constructors 
      Constructor Description
      MapBackedDouble​(java.util.Map sourceMap, java.lang.String property)
      Construct a MapBackedDouble with a certain property name and default value of 0.0
      MapBackedDouble​(java.util.Map sourceMap, java.lang.String property, java.lang.Double valueIfMissing)
      Construct a MapBackedDouble with a certain property name and default value
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Optional<java.lang.Double> queryOption()
      Hook to allow the property to be queryable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapBackedDouble

        public MapBackedDouble​(java.util.Map sourceMap,
                               java.lang.String property,
                               java.lang.Double valueIfMissing)
        Construct a MapBackedDouble with a certain property name and default value
        Parameters:
        sourceMap - Map to store the Double value in
        property - Key name of the property
        valueIfMissing - value to set if missing
      • MapBackedDouble

        public MapBackedDouble​(java.util.Map sourceMap,
                               java.lang.String property)
        Construct a MapBackedDouble with a certain property name and default value of 0.0
        Parameters:
        sourceMap - Map to store the Double value in
        property - Key name of the property
    • Method Detail

      • queryOption

        protected java.util.Optional<java.lang.Double> queryOption()
                                                            throws com.legyver.core.exception.CoreException
        Description copied from class: MapBackedProperty
        Hook to allow the property to be queryable
        Specified by:
        queryOption in class MapBackedProperty<java.lang.Double>
        Returns:
        the query option to use for the Property
        Throws:
        com.legyver.core.exception.CoreException - if there is a problem marshalling to/from JSON