Class PMap


  • public final class PMap
    extends Value
    • Field Detail

      • EMPTY

        public static final PMap EMPTY
    • Method Detail

      • getBoolean

        public boolean getBoolean​(String key,
                                  boolean def)
      • getInt

        public int getInt​(String key,
                          int def)
      • getDouble

        public double getDouble​(String key,
                                double def)
      • size

        public int size()
      • toString

        public String toString()
        Description copied from class: Value
        Values must override the default method to return a string representation that is immutable.
        Specified by:
        toString in class Value
        Returns:
        String representation
      • isEmpty

        public boolean isEmpty()
        Description copied from class: Value
        Check whether this Value is an empty value and has a zero length string representation. Subclasses may wish to override this for efficiency if the String representation is lazily created.
        Overrides:
        isEmpty in class Value
        Returns:
        boolean true if empty
      • hashCode

        public int hashCode()
        Description copied from class: Value
        Values must override the default hashcode method.
        Specified by:
        hashCode in class Value
        Returns:
        int hashcode
      • equals

        public boolean equals​(Object obj)
        Description copied from class: Value
        Values must override the default equals method. This method should only return true if the supplied Object is of the same type as the implementing Value. Values of an unknown type should be coerced before calling this method. This method does not have to guarantee that this.equals(that) == this.toString().equals(that.toString())
        Specified by:
        equals in class Value
        Returns:
        boolean
      • builder

        public static PMap.Builder builder​(int initialCapacity)