Class VariantObjectBuilder

java.lang.Object
com.massifmaps.core.VariantObjectBuilder

public class VariantObjectBuilder extends Object
A helper class for building variant objects.
  • Constructor Details

    • VariantObjectBuilder

      public VariantObjectBuilder()
      A default constructor.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • clear

      public void clear()
      Clears the object.
    • setString

      public void setString(String key, String str)
      Sets a specified string value.
      Parameters:
      key - The key to set.
      str - The string value.
    • setBool

      public void setBool(String key, boolean val)
      Sets a specified boolean value.
      Parameters:
      key - The key to set.
      val - The boolean value.
    • setLong

      public void setLong(String key, long val)
      Sets a specified long integer value.
      Parameters:
      key - The key to set.
      val - The integer value.
    • setDouble

      public void setDouble(String key, double val)
      Sets a specified double precision floating point value.
      Parameters:
      key - The key to set.
      val - The floating point value.
    • setVariant

      public void setVariant(String key, Variant var)
      Sets a specified variant value.
      Parameters:
      key - The key to set.
      var - The variant to add.
    • buildVariant

      public Variant buildVariant()
      Builds a new object variant from the added elements.
      Returns:
      The corresponding variant object.