Package com.massifmaps.core
Class VariantObjectBuilder
java.lang.Object
com.massifmaps.core.VariantObjectBuilder
A helper class for building variant objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds a new object variant from the added elements.voidclear()Clears the object.booleanChecks if this object is equal to the specified object.inthashCode()Returns the hash value of this object.voidSets a specified boolean value.voidSets a specified double precision floating point value.voidSets a specified long integer value.voidSets a specified string value.voidsetVariant(String key, Variant var) Sets a specified variant value.
-
Constructor Details
-
VariantObjectBuilder
public VariantObjectBuilder()A default constructor.
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
clear
public void clear()Clears the object. -
setString
Sets a specified string value.- Parameters:
key- The key to set.str- The string value.
-
setBool
Sets a specified boolean value.- Parameters:
key- The key to set.val- The boolean value.
-
setLong
Sets a specified long integer value.- Parameters:
key- The key to set.val- The integer value.
-
setDouble
Sets a specified double precision floating point value.- Parameters:
key- The key to set.val- The floating point value.
-
setVariant
Sets a specified variant value.- Parameters:
key- The key to set.var- The variant to add.
-
buildVariant
Builds a new object variant from the added elements.- Returns:
- The corresponding variant object.
-