Class ValueMap

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<String,​Object>, IValueMap
    Direct Known Subclasses:

    public class ValueMap
    extends LinkedHashMap<String,​Object>
    implements IValueMap
    A IValueMap implementation that holds values, parses Strings, and exposes a variety of convenience methods.

    In addition to a no-arg constructor and a copy constructor that takes a Map argument, ValueMaps can be constructed using a parsing constructor. ValueMap(String) will parse values from the string in comma separated key/value assignment pairs. For example, new ValueMap("a=9,b=foo").

    Values can be retrieved from the ValueMap in the usual way or with methods that do handy conversions to various types, including String, StringValue, int, long, double, Time and Duration.

    The makeImmutable method will make the underlying Map immutable. Further attempts to change the Map will result in a RuntimeException.

    The toString method converts a ValueMap object to a readable key/value string for diagnostics.

    Jonathan Locke, Doug Donohoe
    See Also:
    Serialized Form