Class JsonReader.Key

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<JsonReader.Key>
    Enclosing class:
    JsonReader

    public static class JsonReader.Key
    extends java.lang.Object
    implements java.lang.Comparable<JsonReader.Key>, java.io.Serializable
    Implements a map key. Contains a list of indices.
    See Also:
    Serialized Form
    • Method Detail

      • add

        public void add​(int index)
        Adds an index to the key.
        Parameters:
        index - the index position
      • key

        public java.lang.String key()
        Gets the key as string.
        Returns:
        a string containing all indices.
      • indexAt

        public int indexAt​(int iteration)
        Gets the element at a given position.
        Parameters:
        iteration - the position
        Returns:
        an integer
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • copy

        public static JsonReader.Key copy​(JsonReader.Key srcKey)
        Clones the instance.
        Parameters:
        srcKey - the source instance
        Returns:
        a new instance