Class MapBackedInteger


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

      Constructors 
      Constructor Description
      MapBackedInteger​(java.util.Map sourceMap, java.lang.String property)
      Construct a MapBackedInteger with a certain property name.
      MapBackedInteger​(java.util.Map sourceMap, java.lang.String property, java.lang.Integer valueIfMissing)
      Construct a MapBackedInteger 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.Integer> queryOption()
      Hook to allow the Integer to be queryable
      • Methods inherited from class java.lang.Object

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

      • MapBackedInteger

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

        public MapBackedInteger​(java.util.Map sourceMap,
                                java.lang.String property)
        Construct a MapBackedInteger with a certain property name. The default value will be 0.
        Parameters:
        sourceMap - Map to store the Integer value in
        property - Key name of the property
    • Method Detail

      • queryOption

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