edu.princeton.cs.algs4.growingtree.framework
Class KeyType

java.lang.Object
  extended by edu.princeton.cs.algs4.growingtree.framework.KeyType
All Implemented Interfaces:
java.lang.Comparable<KeyType>

public class KeyType
extends java.lang.Object
implements java.lang.Comparable<KeyType>


Field Summary
static int CHARTYPE
           
static int DOUBLETYPE
           
static int INTTYPE
           
static int STRINGTYPE
           
 
Constructor Summary
KeyType(char value)
           
KeyType(double value)
           
KeyType(int value)
           
KeyType(java.lang.String value)
           
 
Method Summary
 char charValue()
           
 int compareTo(KeyType other)
           
 double doubleValue()
           
 boolean equals(java.lang.Object other)
           
 int getType()
           
 int intValue()
           
 boolean isChar()
           
 boolean isDouble()
           
 boolean isInt()
           
 boolean isString()
           
 java.lang.String stringValue()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INTTYPE

public static int INTTYPE

CHARTYPE

public static int CHARTYPE

DOUBLETYPE

public static int DOUBLETYPE

STRINGTYPE

public static int STRINGTYPE
Constructor Detail

KeyType

public KeyType(int value)

KeyType

public KeyType(char value)

KeyType

public KeyType(double value)

KeyType

public KeyType(java.lang.String value)
Method Detail

intValue

public int intValue()

charValue

public char charValue()

doubleValue

public double doubleValue()

stringValue

public java.lang.String stringValue()

isInt

public boolean isInt()

isChar

public boolean isChar()

isDouble

public boolean isDouble()

isString

public boolean isString()

getType

public int getType()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(KeyType other)
Specified by:
compareTo in interface java.lang.Comparable<KeyType>