Class Attributes

java.lang.Object
org.dizitart.no2.common.meta.Attributes
All Implemented Interfaces:
Serializable

public class Attributes extends Object implements Serializable
Represents metadata attributes of a NitriteMap.
Since:
1.0
Author:
Anindya Chatterjee
See Also:
  • Field Details

  • Constructor Details

    • Attributes

      public Attributes()
      Instantiates a new Attributes.
    • Attributes

      public Attributes(String collection)
      Instantiates a new Attributes.
      Parameters:
      collection - the collection
  • Method Details

    • set

      public Attributes set(String key, String value)
      Adds a key-value pair to the attributes and returns the updated Attributes object.
      Parameters:
      key - The key is a string that represents the attribute name. It is used to identify the attribute in the attributes.
      value - The value parameter is a string that represents the value to be associated with the given key in the attributes.
      Returns:
      The method is returning an instance of the Attributes class.
    • get

      public String get(String key)
      Retrieves the value associated with a given key from a Attributes.
      Parameters:
      key - The "key" parameter is a String that represents the key of the attribute that you want to retrieve from the attributes.
      Returns:
      The method is returning the value associated with the given key in the attributes.
    • hasKey

      public boolean hasKey(String key)
      Check whether a key exists in the attributes.
      Parameters:
      key - the key
      Returns:
      the boolean
    • getAttributes

      public Map<String,String> getAttributes()
    • setAttributes

      public void setAttributes(Map<String,String> attributes)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object