org.apache.hadoop.hive.common.type
Class HiveChar

java.lang.Object
  extended by org.apache.hadoop.hive.common.type.HiveBaseChar
      extended by org.apache.hadoop.hive.common.type.HiveChar
All Implemented Interfaces:
Comparable<HiveChar>

public class HiveChar
extends HiveBaseChar
implements Comparable<HiveChar>

HiveChar. String values will be padded to full char length. Character legnth, comparison, hashCode should ignore trailing spaces.


Field Summary
static int MAX_CHAR_LENGTH
           
 
Fields inherited from class org.apache.hadoop.hive.common.type.HiveBaseChar
value
 
Constructor Summary
HiveChar()
           
HiveChar(HiveChar hc, int len)
           
HiveChar(String val, int len)
           
 
Method Summary
 int compareTo(HiveChar rhs)
           
 boolean equals(Object rhs)
           
 int getCharacterLength()
           
protected  String getPaddedValue()
           
 String getStrippedValue()
           
 int hashCode()
           
 void setValue(String val)
           
 void setValue(String val, int len)
          Set char value, padding or truncating the value to the size of len parameter.
 String toString()
           
 
Methods inherited from class org.apache.hadoop.hive.common.type.HiveBaseChar
enforceMaxLength, getPaddedValue, getValue, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_CHAR_LENGTH

public static final int MAX_CHAR_LENGTH
See Also:
Constant Field Values
Constructor Detail

HiveChar

public HiveChar()

HiveChar

public HiveChar(String val,
                int len)

HiveChar

public HiveChar(HiveChar hc,
                int len)
Method Detail

setValue

public void setValue(String val,
                     int len)
Set char value, padding or truncating the value to the size of len parameter.

Overrides:
setValue in class HiveBaseChar
Parameters:
val - new value

setValue

public void setValue(String val)

getStrippedValue

public String getStrippedValue()

getPaddedValue

protected String getPaddedValue()

getCharacterLength

public int getCharacterLength()
Overrides:
getCharacterLength in class HiveBaseChar

toString

public String toString()
Overrides:
toString in class HiveBaseChar

compareTo

public int compareTo(HiveChar rhs)
Specified by:
compareTo in interface Comparable<HiveChar>

equals

public boolean equals(Object rhs)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class HiveBaseChar


Copyright © 2014 The Apache Software Foundation. All rights reserved.