Top Description Fields Constructors Methods
org.h2.value

public final Class ValueVarcharIgnoreCase

extends ValueStringBase
Class Inheritance
Imports
org.h2.engine.CastDataProvider, .SysProperties, org.h2.util.StringUtils

Implementation of the VARCHAR_IGNORECASE data type.

Field Summary

Modifier and TypeField and Description
private static final ValueVarcharIgnoreCase
private int
hash

The hash code.

Inherited from org.h2.value.ValueStringBase:
value

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Overrides org.h2.value.ValueStringBase.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
)

Overrides org.h2.value.ValueStringBase.equals.

Check if the two values have the same hash code.

public static ValueVarcharIgnoreCase

Returns:

the value
get
(String
the string
s
)

Get or create a VARCHAR_IGNORECASE value for the given string.

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 int
getValueType()

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

Get the value type.

public int
hashCode()

Overrides org.h2.value.ValueStringBase.hashCode.

Returns a hash code value for this object.

Inherited from org.h2.value.ValueStringBase:
getBigDecimalgetBooleangetBytegetBytesgetDoublegetFloatgetIntgetLonggetMemorygetShortgetStringgetType

Field Detail

EMPTYback to summary
private static final ValueVarcharIgnoreCase EMPTY
hashback to summary
private int hash

The hash code.

Constructor Detail

ValueVarcharIgnoreCaseback to summary
private ValueVarcharIgnoreCase(String value)

Method Detail

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

Overrides org.h2.value.ValueStringBase.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
v: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)

Overrides org.h2.value.ValueStringBase.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 ValueVarcharIgnoreCase get(String s)

Get or create a VARCHAR_IGNORECASE value for the given string. The value will have the same case as the passed string.

Parameters
s:String

the string

Returns:ValueVarcharIgnoreCase

the value

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
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
hashCodeback to summary
public int hashCode()

Overrides org.h2.value.ValueStringBase.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override