Top Description Fields Constructors Methods
org.h2.value

public final Class ValueArray

extends ValueCollectionBase
Class Inheritance
Imports
org.h2.engine.CastDataProvider, .Constants, org.h2.message.DbException

Implementation of the ARRAY data type.

Field Summary

Modifier and TypeField and Description
private final TypeInfo
public static final ValueArray
EMPTY

Empty array.

private TypeInfo
Inherited from org.h2.value.ValueCollectionBase:
values

Constructor Summary

AccessConstructor and Description
private
ValueArray(TypeInfo componentType, Value[] list, CastDataProvider provider)

Method Summary

Modifier and TypeMethod and Description
public int
compareTypeSafe(Value
the other value
o
,
CompareMode
the compare mode
mode
,
CastDataProvider
the cast information provider
provider
)

Implements abstract org.h2.value.Value.compareTypeSafe.

Compare this value against another value given that the values are of the same data type.

public boolean
equals(Object
the other value
other
)

Implements abstract org.h2.value.Value.equals.

Check if the two values have the same hash code.

public static ValueArray

Returns:

the value
get
(Value[]
the value array
list
,
CastDataProvider
the cast information provider
provider
)

Get or create a array value for the given value array.

public static ValueArray

Returns:

the value
get
(TypeInfo
the type of elements, or null
componentType
,
Value[]
the value array
list
,
CastDataProvider
the cast information provider
provider
)

Get or create a array value for the given value array.

public TypeInfo
public StringBuilder
getSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Implements org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

public String
getString()

Implements abstract org.h2.value.Value.getString.

Get the value as a string.

public TypeInfo
getType()

Implements abstract org.h2.value.Value.getType.

Implements org.h2.value.Typed.getType.

Returns the data type.

public int
getValueType()

Implements abstract org.h2.value.Value.getValueType.

Get the value type.

Inherited from org.h2.value.ValueCollectionBase:
compareWithNullcontainsNullgetListgetMemorygetValueWithFirstNullImplhashCode

Field Detail

componentTypeback to summary
private final TypeInfo componentType
EMPTYback to summary
public static final ValueArray EMPTY

Empty array.

typeback to summary
private TypeInfo type

Constructor Detail

ValueArrayback to summary
private ValueArray(TypeInfo componentType, Value[] list, CastDataProvider provider)

Method Detail

compareTypeSafeback to summary
public int compareTypeSafe(Value o, CompareMode mode, CastDataProvider provider)

Implements abstract org.h2.value.Value.compareTypeSafe.

Doc from org.h2.value.Value.compareTypeSafe.

Compare this value against another value given that the values are of the same data type.

Parameters
o:Value

the other value

mode:CompareMode

the compare mode

provider:CastDataProvider

the cast information provider

Returns:int

0 if both values are equal, -1 if the other value is smaller, and 1 otherwise

Annotations
@Override
equalsback to summary
public boolean equals(Object other)

Implements abstract org.h2.value.Value.equals.

Doc from org.h2.value.Value.equals.

Check if the two values have the same hash code. No data conversion is made; this method returns false if the other object is not of the same class. For some values, compareTo may return 0 even if equals return false. Example: ValueDecimal 0.0 and 0.00.

Parameters
other:Object

the other value

Returns:boolean

true if they are equal

Annotations
@Override
getback to summary
public static ValueArray get(Value[] list, CastDataProvider provider)

Get or create a array value for the given value array. Do not clone the data.

Parameters
list:Value[]

the value array

provider:CastDataProvider

the cast information provider

Returns:ValueArray

the value

getback to summary
public static ValueArray get(TypeInfo componentType, Value[] list, CastDataProvider provider)

Get or create a array value for the given value array. Do not clone the data.

Parameters
componentType:TypeInfo

the type of elements, or null

list:Value[]

the value array

provider:CastDataProvider

the cast information provider

Returns:ValueArray

the value

getComponentTypeback to summary
public TypeInfo getComponentType()
getSQLback to summary
public StringBuilder getSQL(StringBuilder builder, int sqlFlags)

Implements org.h2.util.HasSQL.getSQL.

Doc from org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getStringback to summary
public String getString()

Implements abstract org.h2.value.Value.getString.

Doc from org.h2.value.Value.getString.

Get the value as a string.

Returns:String

the string

Annotations
@Override
getTypeback to summary
public TypeInfo getType()

Implements abstract org.h2.value.Value.getType.

Implements org.h2.value.Typed.getType.

Doc from org.h2.value.Typed.getType.

Returns the data type.

Returns:TypeInfo

the data type

Annotations
@Override
getValueTypeback to summary
public int getValueType()

Implements abstract org.h2.value.Value.getValueType.

Doc from org.h2.value.Value.getValueType.

Get the value type.

Returns:int

the value type

Annotations
@Override