public class VarcharConstant extends Constant
| Constructor and Description |
|---|
VarcharConstant(byte[] v,
Type type) |
VarcharConstant(String s)
Create a constant by wrapping the specified string.
|
VarcharConstant(String s,
Type type) |
| Modifier and Type | Method and Description |
|---|---|
Constant |
add(Constant c)
Adds this constant a value specified by another constant.
|
byte[] |
asBytes()
Each char is encoded using the
VarcharType.CHAR_SET. |
Object |
asJavaVal()
Unwraps the string and returns it.
|
Constant |
castTo(Type type)
Casts this constant to the specified type.
|
int |
compareTo(Constant c) |
Constant |
div(Constant c)
Divides this constant by a value specified by another constant.
|
boolean |
equals(Object obj)
Indicates whether some other object is
Constant object and its
value equal to this one. |
Type |
getType()
Returns the type corresponding to this constant.
|
int |
hashCode() |
Constant |
mul(Constant c)
Multiplies this constant by a value specified by another constant.
|
int |
size()
Return the number of bytes required to encode this constant.
|
Constant |
sub(Constant c)
Subtracts a value specified by another constant from this constant.
|
String |
toString() |
defaultInstance, newInstancepublic VarcharConstant(String s)
s - the string valuepublic VarcharConstant(byte[] v,
Type type)
public Type getType()
Constantpublic Object asJavaVal()
asJavaVal in class ConstantConstant.asJavaVal()public byte[] asBytes()
VarcharType.CHAR_SET.public int size()
Constantpublic Constant castTo(Type type)
Constantpublic boolean equals(Object obj)
Constant object and its
value equal to this one.public int compareTo(Constant c)
public Constant add(Constant c)
Constantpublic Constant sub(Constant c)
Constantpublic Constant div(Constant c)
ConstantCopyright © 2022 VanillaDB Organization. All rights reserved.