Package com.massifmaps.core
Class VariantArrayBuilder
java.lang.Object
com.massifmaps.core.VariantArrayBuilder
A helper class for building variant arrays.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBool(boolean val) Adds a new boolean to the array as the last element.voidaddDouble(double val) Adds a new double floating point value to the array as the last element.voidaddLong(long val) Adds a new long integer to the array as the last element.voidAdds a new string to the array as the last element.voidaddVariant(Variant var) Adds a new variant to the array as the last element.Builds a new array variant from the added elements.voidclear()Clears the array.booleanChecks if this object is equal to the specified object.inthashCode()Returns the hash value of this object.
-
Constructor Details
-
VariantArrayBuilder
public VariantArrayBuilder()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 array. -
addString
Adds a new string to the array as the last element.- Parameters:
str- The string to add.
-
addBool
public void addBool(boolean val) Adds a new boolean to the array as the last element.- Parameters:
val- The boolean to add.
-
addLong
public void addLong(long val) Adds a new long integer to the array as the last element.- Parameters:
val- The integer to add.
-
addDouble
public void addDouble(double val) Adds a new double floating point value to the array as the last element.- Parameters:
val- The floating point value to add.
-
addVariant
Adds a new variant to the array as the last element.- Parameters:
var- The variant to add.
-
buildVariant
Builds a new array variant from the added elements.- Returns:
- The corresponding variant object.
-