edu.iu.cnets.klatsch.lang
Class VString

java.lang.Object
  extended by edu.iu.cnets.klatsch.lang.Value
      extended by edu.iu.cnets.klatsch.lang.VString

public class VString
extends Value

String values.


Field Summary
 java.lang.String val
          the value actually being stored
 
Constructor Summary
VString(java.lang.String val)
          Initialize a new string value.
 
Method Summary
 boolean equals(java.lang.Object other)
          This override is necessary to use the class as a key in a HashMap object.
 int hashCode()
          This override is necessary to use the class as a key in a HashMap object.
 Value method_cap(Value... args)
          cap() : Capitalizes the first letter of the string.
 Value method_contains(Value... args)
          contains(s) : Tests whether the string contains s.
 Value method_len(Value... args)
          len() : Returns the length of the string.
 Value method_list(Value... args)
          list() : Converts the string into a list of single-character substrings.
 Value method_lower(Value... args)
          lower() : Returns the lowercase version of the string.
 Value method_matches(Value... args)
          s.matches(r) : Tests whether the string matches r.
 Value method_num(Value... args)
          num() : Returns a numeric version of the string.
 Value method_split(Value... args)
          split(r, {n}) : Returns the string as split by the regex r (limit of n pieces).
 Value method_substr(Value... args)
          substr(n1, {n2}) : Returns the substring from n1 to n2-1 or from n1 to the end.
 Value method_trim(Value... args)
          trim() : Strips leading and trailing whitespace from the string.
 Value method_upper(Value... args)
          upper() : Returns the uppercase version of the string.
 java.lang.String toString()
          Convert the string to a string, which isn't difficult.
 
Methods inherited from class edu.iu.cnets.klatsch.lang.Value
require, requireCount, requireType, toJson
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

val

public final java.lang.String val
the value actually being stored

Constructor Detail

VString

public VString(java.lang.String val)
Initialize a new string value.

Parameters:
val - the string
Method Detail

equals

public boolean equals(java.lang.Object other)
This override is necessary to use the class as a key in a HashMap object.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
This override is necessary to use the class as a key in a HashMap object.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Convert the string to a string, which isn't difficult.

Specified by:
toString in class Value
Returns:
the string

method_cap

public Value method_cap(Value... args)
                 throws EvaluationException
cap() : Capitalizes the first letter of the string.

Throws:
EvaluationException

method_contains

public Value method_contains(Value... args)
                      throws EvaluationException
contains(s) : Tests whether the string contains s.

Throws:
EvaluationException

method_len

public Value method_len(Value... args)
                 throws EvaluationException
len() : Returns the length of the string.

Throws:
EvaluationException

method_list

public Value method_list(Value... args)
                  throws EvaluationException
list() : Converts the string into a list of single-character substrings.

Throws:
EvaluationException

method_lower

public Value method_lower(Value... args)
                   throws EvaluationException
lower() : Returns the lowercase version of the string.

Throws:
EvaluationException

method_matches

public Value method_matches(Value... args)
                     throws EvaluationException
s.matches(r) : Tests whether the string matches r.

Throws:
EvaluationException

method_num

public Value method_num(Value... args)
                 throws EvaluationException
num() : Returns a numeric version of the string.

Throws:
EvaluationException

method_split

public Value method_split(Value... args)
                   throws EvaluationException
split(r, {n}) : Returns the string as split by the regex r (limit of n pieces).

Throws:
EvaluationException

method_substr

public Value method_substr(Value... args)
                    throws EvaluationException
substr(n1, {n2}) : Returns the substring from n1 to n2-1 or from n1 to the end.

Throws:
EvaluationException

method_trim

public Value method_trim(Value... args)
                  throws EvaluationException
trim() : Strips leading and trailing whitespace from the string.

Throws:
EvaluationException

method_upper

public Value method_upper(Value... args)
                   throws EvaluationException
upper() : Returns the uppercase version of the string.

Throws:
EvaluationException