Class DataSet

java.lang.Object
icyllis.modernui.util.DataSet
All Implemented Interfaces:
Parcelable, Map<String,Object>

public final class DataSet extends Object implements Map<String,Object>, Parcelable
A DataSet encapsulates mappings from string keys to primitive values (includes String and UUID values). The specified data types can safely be persisted to and restored from local storage and network in binary form. Unsupported I/O data types can also be put into the data set for in-memory operations, and they will be silently ignored during I/O.

A DataSet object can be put into other data sets (exclude itself) to construct a tree structure. Additionally, an array structure (exposed in List) is also supported, where elements are backed by ArrayList.

The implementation of this class is a linked hash map, which is fast and small-footprint.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface java.util.Map

    Map.Entry<K,V>

    Nested classes/interfaces inherited from interface icyllis.modernui.util.Parcelable

    Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>, Parcelable.WriteFlags
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new, empty DataSet.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all of the mappings from this map.
    boolean
    Returns true if this map contains a mapping for the specified key.
    boolean
    Returns true if this map contains one or more keys to the specified value.
     
    boolean
     
    get(Object key)
    Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
    boolean
    Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
    boolean
    getBoolean(String key, boolean defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    byte
    Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.
    byte
    getByte(String key, byte defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    byte[]
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    char
    Returns the value associated with the given key, or '0' if no mapping of the desired type exists for the given key.
    char
    getChar(String key, char defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    double
    Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.
    double
    getDouble(String key, double defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    double[]
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    float
    Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.
    float
    getFloat(String key, float defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    float[]
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    int
    Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.
    int
    getInt(String key, int defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    int[]
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    <T> List<T>
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    long
    Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
    long
    getLong(String key, long defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    long[]
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    getOrDefault(Object key, Object defaultValue)
     
    short
    Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.
    short
    getShort(String key, short defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    short[]
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    getString(String key, String defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
    getUUID(String key, UUID defaultValue)
    Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
    <T> T
    Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
    <T> T
    getValue(String key, Class<T> clazz)
    Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
    int
     
    boolean
    Returns true if this map contains no key-value mappings.
     
    put(String key, Object value)
    Associates the specified value with the specified key in this map.
    void
    putAll(Map<? extends String,?> map)
     
    void
    putBoolean(String key, boolean value)
    Inserts a boolean value into the mapping, replacing any existing value for the given key.
    void
    putByte(String key, byte value)
    Inserts a byte value into the mapping, replacing any existing value for the given key.
    void
    putByteArray(String key, byte[] value)
    Inserts a byte[] value into the mapping, replacing any existing value for the given key.
    void
    putDataSet(String key, DataSet value)
    Inserts a DataSet value into the mapping, replacing any existing value for the given key.
    void
    putDouble(String key, double value)
    Inserts a double value into the mapping, replacing any existing value for the given key.
    void
    putDoubleArray(String key, double[] value)
    Inserts a double[] value into the mapping, replacing any existing value for the given key.
    void
    putFloat(String key, float value)
    Inserts a float value into the mapping, replacing any existing value for the given key.
    void
    putFloatArray(String key, float[] value)
    Inserts a float[] value into the mapping, replacing any existing value for the given key.
    putIfAbsent(String key, Object value)
     
    void
    putInt(String key, int value)
    Inserts an int value into the mapping, replacing any existing value for the given key.
    void
    putIntArray(String key, int[] value)
    Inserts an int[] value into the mapping, replacing any existing value for the given key.
    void
    putList(String key, List<?> value)
    Inserts a List value into the mapping, replacing any existing value for the given key.
    void
    putLong(String key, long value)
    Inserts a long value into the mapping, replacing any existing value for the given key.
    void
    putLongArray(String key, long[] value)
    Inserts a long[] value into the mapping, replacing any existing value for the given key.
    void
    putShort(String key, short value)
    Inserts a short value into the mapping, replacing any existing value for the given key.
    void
    putShortArray(String key, short[] value)
    Inserts a short[] value into the mapping, replacing any existing value for the given key.
    void
    putString(String key, String value)
    Inserts a String value into the mapping, replacing any existing value for the given key.
    void
    putUUID(String key, UUID value)
    Inserts a UUID value into the mapping, replacing any existing value for the given key.
    Removes the mapping for a key from this map if it is present.
    Removes the mapping associated with the first key in iteration order.
    Removes the mapping associated with the last key in iteration order.
    int
    Returns the number of key-value mappings in this map.
     
     
    void
    writeToParcel(Parcel dest, int flags)
    The subclass implements the method to flatten its contents by calling the methods of Parcel for its primitive values.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Map

    compute, computeIfAbsent, computeIfPresent, forEach, merge, remove, replace, replace, replaceAll
  • Field Details

  • Constructor Details

    • DataSet

      public DataSet()
      Creates a new, empty DataSet.
  • Method Details

    • size

      public int size()
      Returns the number of key-value mappings in this map.
      Specified by:
      size in interface Map<String,Object>
      Returns:
      the number of key-value mappings in this map
    • isEmpty

      public boolean isEmpty()
      Returns true if this map contains no key-value mappings.
      Specified by:
      isEmpty in interface Map<String,Object>
      Returns:
      true if this map contains no key-value mappings
    • containsKey

      public boolean containsKey(Object key)
      Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains a mapping for a key k such that Objects.equals(key, k). (There can be at most one such mapping.)
      Specified by:
      containsKey in interface Map<String,Object>
      Parameters:
      key - the key whose presence in this data set is to be tested
      Returns:
      true if this data set contains a mapping for the specified key
      Throws:
      NullPointerException - if the specified key is null
    • containsValue

      public boolean containsValue(Object value)
      Returns true if this map contains one or more keys to the specified value. More formally, returns true if and only if this map contains at least one mapping to a value v such that Objects.equals(value, v). This operation requires time linear in the map size.
      Specified by:
      containsValue in interface Map<String,Object>
      Parameters:
      value - value whose presence in this map is to be tested
      Returns:
      true if this map contains one or more keys to the specified value
    • get

      public Object get(Object key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

      More formally, if this map contains a mapping from a key k to a value v such that Objects.equals(key, k), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)

      Specified by:
      get in interface Map<String,Object>
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the value to which the specified key is mapped, or null if this map contains no mapping for the key
      Throws:
      NullPointerException - if the specified key is null
    • getOrDefault

      public Object getOrDefault(Object key, Object defaultValue)
      Specified by:
      getOrDefault in interface Map<String,Object>
    • putIfAbsent

      @Nullable public Object putIfAbsent(String key, Object value)
      Specified by:
      putIfAbsent in interface Map<String,Object>
    • getValue

      public <T> T getValue(String key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the value to which the specified key is mapped, or null if this map contains no mapping for the key
    • getValue

      public <T> T getValue(String key, Class<T> clazz)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the value to which the specified key is mapped, or null if this map contains no mapping for the key
    • getBoolean

      public boolean getBoolean(String key)
      Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the boolean value to which the specified key is mapped
    • getBoolean

      public boolean getBoolean(String key, boolean defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the boolean value to which the specified key is mapped
    • getByte

      public byte getByte(String key)
      Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the byte value to which the specified key is mapped
    • getByte

      public byte getByte(String key, byte defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the byte value to which the specified key is mapped
    • getChar

      public char getChar(String key)
      Returns the value associated with the given key, or '0' if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the char value to which the specified key is mapped
    • getChar

      public char getChar(String key, char defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the char value to which the specified key is mapped
    • getShort

      public short getShort(String key)
      Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the short value to which the specified key is mapped
    • getShort

      public short getShort(String key, short defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the short value to which the specified key is mapped
    • getInt

      public int getInt(String key)
      Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the int value to which the specified key is mapped
    • getInt

      public int getInt(String key, int defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the int value to which the specified key is mapped
    • getLong

      public long getLong(String key)
      Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the long value to which the specified key is mapped
    • getLong

      public long getLong(String key, long defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the long value to which the specified key is mapped
    • getFloat

      public float getFloat(String key)
      Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the float value to which the specified key is mapped
    • getFloat

      public float getFloat(String key, float defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the float value to which the specified key is mapped
    • getDouble

      public double getDouble(String key)
      Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the double value to which the specified key is mapped
    • getDouble

      public double getDouble(String key, double defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. Significantly, any numbers found with the key can be returned.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist
      Returns:
      the double value to which the specified key is mapped
    • getByteArray

      public byte[] getByteArray(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the byte[] value to which the specified key is mapped, or null
    • getShortArray

      public short[] getShortArray(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the short[] value to which the specified key is mapped, or null
    • getIntArray

      public int[] getIntArray(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the int[] value to which the specified key is mapped, or null
    • getLongArray

      public long[] getLongArray(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the long[] value to which the specified key is mapped, or null
    • getFloatArray

      public float[] getFloatArray(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the float[] value to which the specified key is mapped, or null
    • getDoubleArray

      public double[] getDoubleArray(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the double[] value to which the specified key is mapped, or null
    • getString

      public String getString(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the String value to which the specified key is mapped, or null
    • getString

      @NonNull public String getString(String key, String defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist or if a null value is associated with the given key.
      Returns:
      the String value associated with the given key, or defaultValue if no valid String object is currently mapped to that key.
    • getUUID

      public UUID getUUID(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the UUID value to which the specified key is mapped, or null
    • getUUID

      @NonNull public UUID getUUID(String key, UUID defaultValue)
      Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      defaultValue - the value to return if key does not exist or if a null value is associated with the given key.
      Returns:
      the UUID value associated with the given key, or defaultValue if no valid UUID object is currently mapped to that key.
    • getList

      public <T> List<T> getList(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.

      Note that if the list elements are primitive types, you should use the methods which are specified by primitive types.

      Type Parameters:
      T - the element type
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the List value to which the specified key is mapped, or null
    • getDataSet

      public DataSet getDataSet(String key)
      Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the DataSet value to which the specified key is mapped, or null
    • put

      @Nullable public Object put(String key, Object value)
      Associates the specified value with the specified key in this map.
      If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Specified by:
      put in interface Map<String,Object>
      Parameters:
      key - the key with which the specified value is to be associated
      value - the value to be associated with the specified key
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • putByte

      public void putByte(String key, byte value)
      Inserts a byte value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the byte value to be associated with the specified key
    • putShort

      public void putShort(String key, short value)
      Inserts a short value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the short value to be associated with the specified key
    • putInt

      public void putInt(String key, int value)
      Inserts an int value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the int value to be associated with the specified key
    • putLong

      public void putLong(String key, long value)
      Inserts a long value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the long value to be associated with the specified key
    • putFloat

      public void putFloat(String key, float value)
      Inserts a float value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the float value to be associated with the specified key
    • putDouble

      public void putDouble(String key, double value)
      Inserts a double value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the double value to be associated with the specified key
    • putBoolean

      public void putBoolean(String key, boolean value)
      Inserts a boolean value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the boolean value to be associated with the specified key
    • putString

      public void putString(String key, String value)
      Inserts a String value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the String value to be associated with the specified key
    • putUUID

      public void putUUID(String key, UUID value)
      Inserts a UUID value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the UUID value to be associated with the specified key
    • putList

      public void putList(String key, List<?> value)
      Inserts a List value into the mapping, replacing any existing value for the given key.

      The list value type must be the same and supported by DataSets. Significantly, the list can be nested list or a list of nodes.

      Note that if the list elements are primitive types, you should use the methods which are specified by primitive types.

      Parameters:
      key - the key with which the specified value is to be associated
      value - the List value to be associated with the specified key
    • putDataSet

      public void putDataSet(String key, DataSet value)
      Inserts a DataSet value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the DataSet value to be associated with the specified key
    • putByteArray

      public void putByteArray(String key, byte[] value)
      Inserts a byte[] value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the byte[] value to be associated with the specified key
    • putShortArray

      public void putShortArray(String key, short[] value)
      Inserts a short[] value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the short[] value to be associated with the specified key
    • putIntArray

      public void putIntArray(String key, int[] value)
      Inserts an int[] value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the int[] value to be associated with the specified key
    • putLongArray

      public void putLongArray(String key, long[] value)
      Inserts a long[] value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the long[] value to be associated with the specified key
    • putFloatArray

      public void putFloatArray(String key, float[] value)
      Inserts a float[] value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the float[] value to be associated with the specified key
    • putDoubleArray

      public void putDoubleArray(String key, double[] value)
      Inserts a double[] value into the mapping, replacing any existing value for the given key.
      Parameters:
      key - the key with which the specified value is to be associated
      value - the double[] value to be associated with the specified key
    • remove

      public Object remove(Object key)
      Removes the mapping for a key from this map if it is present.

      Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key.

      The map will not contain a mapping for the specified key once the call returns.

      Specified by:
      remove in interface Map<String,Object>
      Parameters:
      key - key whose mapping is to be removed from the map
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • removeFirst

      public Object removeFirst()
      Removes the mapping associated with the first key in iteration order.
      Returns:
      the value previously associated with the first key in iteration order.
      Throws:
      NoSuchElementException - is this map is empty.
    • removeLast

      public Object removeLast()
      Removes the mapping associated with the last key in iteration order.
      Returns:
      the value previously associated with the last key in iteration order.
      Throws:
      NoSuchElementException - is this map is empty.
    • putAll

      public void putAll(@NonNull Map<? extends String,?> map)
      Specified by:
      putAll in interface Map<String,Object>
    • clear

      public void clear()
      Removes all of the mappings from this map. The map will be empty after this call returns.
      Specified by:
      clear in interface Map<String,Object>
    • keySet

      @NonNull public Set<String> keySet()
      Specified by:
      keySet in interface Map<String,Object>
      Returns:
      a set view of the keys contained in this map
    • values

      @NonNull public Collection<Object> values()
      Specified by:
      values in interface Map<String,Object>
    • entrySet

      @NonNull public Set<Map.Entry<String,Object>> entrySet()
      Specified by:
      entrySet in interface Map<String,Object>
    • writeToParcel

      public void writeToParcel(@NonNull Parcel dest, int flags)
      Description copied from interface: Parcelable
      The subclass implements the method to flatten its contents by calling the methods of Parcel for its primitive values.
      Specified by:
      writeToParcel in interface Parcelable
      Parameters:
      dest - the parcel to write the object's data to
      flags - the flags about how the object should be written
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map<String,Object>
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Map<String,Object>
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object