public class

VariantObjectBuilder

extends Object
java.lang.Object
   ↳ com.carto.core.VariantObjectBuilder

Class Overview

A helper class for building variant objects.

Summary

Public Constructors
VariantObjectBuilder()
A default constructor.
Public Methods
Variant buildVariant()
Builds a new object variant from the added elements.
void clear()
Clears the object.
synchronized void delete()
boolean equals(Object obj)
Checks if this object is equal to the specified object.
int hashCode()
Returns the hash value of this object.
void setBool(String key, boolean val)
Sets a specified boolean value.
void setDouble(String key, double val)
Sets a specified double precision floating point value.
void setLong(String key, long val)
Sets a specified long integer value.
void setString(String key, String str)
Sets a specified string value.
void setVariant(String key, Variant var)
Sets a specified variant value.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public VariantObjectBuilder ()

A default constructor.

Public Methods

public Variant buildVariant ()

Builds a new object variant from the added elements.

Returns
  • The corresponding variant object.

public void clear ()

Clears the object.

public synchronized void delete ()

public boolean equals (Object obj)

Checks if this object is equal to the specified object.

Parameters
obj The reference object.
Returns
  • True when objects are equal, false otherwise.

public int hashCode ()

Returns the hash value of this object.

Returns
  • The hash value of this object.

public void setBool (String key, boolean val)

Sets a specified boolean value.

Parameters
key The key to set.
val The boolean value.

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.

public void setLong (String key, long val)

Sets a specified long integer value.

Parameters
key The key to set.
val The integer value.

public void setString (String key, String str)

Sets a specified string value.

Parameters
key The key to set.
str The string value.

public void setVariant (String key, Variant var)

Sets a specified variant value.

Parameters
key The key to set.
var The variant to add.