org.maverickdbms.basic.string
Class ReferenceString

java.lang.Object
  extended byorg.maverickdbms.basic.ConstantString
      extended byorg.maverickdbms.basic.string.ReferenceString
All Implemented Interfaces:
java.lang.Comparable

public class ReferenceString
extends ConstantString


Field Summary
 
Fields inherited from class org.maverickdbms.basic.ConstantString
AM, EMPTY, FM, IM, LINE_SEPARATOR, MAX_RAISE_DELIMITER, MIN_RAISE_DELIMITER, ONE, RETURN_ELSE, RETURN_SUCCESS, RM, SM, SPACE, TM, VM, ZERO
 
Constructor Summary
ReferenceString(ConstantString mvs, int s, int len)
           
 
Method Summary
 char charAt(int index)
          Returns the character at the specified index.
 int compareTo(ConstantString a)
          Compares two strings lexicographically
 boolean equals(java.lang.Object o)
          Determines whether the object is equal to the string
 java.math.BigDecimal getBigDecimal()
          Returns a BigDecimal representation of the string.
 void getChars(int srcstart, int srcend, char[] dest, int deststart)
          Copies the specified index from the string into the destination character array.
 double getDouble()
          Returns a double representation of the string.
 int indexOf(char c, int start2)
           
 int intValue()
          Returns the integer value of the string
 boolean isIntegral()
           
 boolean isNumeric()
           
 int length()
          Returns the length of the string
 long longValue()
          Returns the integer value of the string
 java.lang.String toString()
          The standard toString method for the object
 
Methods inherited from class org.maverickdbms.basic.ConstantString
ALPHA, AND, ASCII, CAT, CHANGE, CHAR, compareTo, CONVERT, COUNT, DCOUNT, DELETE, DOWNCASE, DQUOTE, DTX, EBCDIC, EQ, EREPLACE, eval, EXTRACT, FIELD, findLength, findPosition, GE, getReferenceString, GT, INDEX, INSERT, LE, LEN, LOCATEI, LOCATEP, LOWER, LT, MATCH, NOT, NUM, OR, RAISE, REPLACE, SELECT, SEQ, SPACE, SQUOTE, STR, SUM, TRIM, UPCASE, XTD
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReferenceString

public ReferenceString(ConstantString mvs,
                       int s,
                       int len)
Method Detail

charAt

public char charAt(int index)
Returns the character at the specified index.

Specified by:
charAt in class ConstantString
Parameters:
index - position of char within the string
Returns:
the character.

compareTo

public int compareTo(ConstantString a)
Description copied from class: ConstantString
Compares two strings lexicographically

Specified by:
compareTo in class ConstantString
Parameters:
a - string to compare
Returns:
0 if equals -ve if less than argument +ve if greater than arg

equals

public boolean equals(java.lang.Object o)
Determines whether the object is equal to the string

Specified by:
equals in class ConstantString
Parameters:
o - the object to be compared

indexOf

public int indexOf(char c,
                   int start2)
Specified by:
indexOf in class ConstantString

getChars

public void getChars(int srcstart,
                     int srcend,
                     char[] dest,
                     int deststart)
Copies the specified index from the string into the destination character array.

Specified by:
getChars in class ConstantString
Parameters:
srcstart - starting postion in the source string.
srcend - ending index + 1 of characters to be copied from source.
dest - the destination character array
deststart - starting position in the destination array.

getDouble

public double getDouble()
Description copied from class: ConstantString
Returns a double representation of the string. If the value is non-numeric zero is returned.

Specified by:
getDouble in class ConstantString
Returns:
the double

isIntegral

public boolean isIntegral()
Specified by:
isIntegral in class ConstantString

isNumeric

public boolean isNumeric()
Specified by:
isNumeric in class ConstantString

length

public int length()
Returns the length of the string

Specified by:
length in class ConstantString
Returns:
the length

toString

public java.lang.String toString()
Description copied from class: ConstantString
The standard toString method for the object

Specified by:
toString in class ConstantString
Returns:
a java.lang.String representation of the object

intValue

public int intValue()
Description copied from class: ConstantString
Returns the integer value of the string

Specified by:
intValue in class ConstantString
Returns:
the integer value.

getBigDecimal

public java.math.BigDecimal getBigDecimal()
Description copied from class: ConstantString
Returns a BigDecimal representation of the string.

Specified by:
getBigDecimal in class ConstantString
Returns:
the BigDecimal

longValue

public long longValue()
Description copied from class: ConstantString
Returns the integer value of the string

Specified by:
longValue in class ConstantString
Returns:
the integer value.