public class

VariantArrayBuilder

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

Class Overview

A helper class for building variant arrays.

Summary

Public Constructors
VariantArrayBuilder()
A default constructor.
Public Methods
void addBool(boolean val)
Adds a new boolean to the array as the last element.
void addDouble(double val)
Adds a new double floating point value to the array as the last element.
void addLong(long val)
Adds a new long integer to the array as the last element.
void addString(String str)
Adds a new string to the array as the last element.
void addVariant(Variant var)
Adds a new variant to the array as the last element.
Variant buildVariant()
Builds a new array variant from the added elements.
void clear()
Clears the array.
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public VariantArrayBuilder ()

A default constructor.

Public Methods

public void addBool (boolean val)

Adds a new boolean to the array as the last element.

Parameters
val The boolean to add.

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.

public void addLong (long val)

Adds a new long integer to the array as the last element.

Parameters
val The integer to add.

public void addString (String str)

Adds a new string to the array as the last element.

Parameters
str The string to add.

public void addVariant (Variant var)

Adds a new variant to the array as the last element.

Parameters
var The variant to add.

public Variant buildVariant ()

Builds a new array variant from the added elements.

Returns
  • The corresponding variant object.

public void clear ()

Clears the array.

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.