|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCrystalValue
com.crystaldecisions.reports.common.value.FormulaValue
com.crystaldecisions.reports.common.value.StringValue
public abstract class StringValue
Provides methods for converting native Java types to a format understood by the Crystal Reports Formula Language.
All Java user defined functions must return a FormulaValue
object.
Field Summary | |
---|---|
static StringValue |
empty
A StringValue object that represents an empty string. |
Constructor Summary | |
---|---|
StringValue()
|
Method Summary | |
---|---|
FormulaValue |
coerceToString()
Internal use only. |
int |
compareTo(java.lang.Object obj,
java.util.Comparator stringComparator)
Internal use only. |
boolean |
equals(java.lang.Object obj,
boolean caseInsensitive)
Returns true if obj has the same class, comparator and string as this StringValue object. |
static StringValue |
fromString(java.lang.String string)
Returns a StringValue that represents the given String . |
static java.lang.String |
getAsString(CrystalValue value,
java.lang.String defaultValue)
|
char |
getCharAt(int index)
Gets the character at the specified index. |
int |
getLength()
Gets the length of this StringValue object. |
abstract java.lang.String |
getString()
Gets a String from this StringValue object. |
java.lang.String |
getSubstring(int beginIndex,
int endIndex)
Gets a substring from this StringValue object. |
ValueType |
getValueType()
Gets the ValueType of this StringValue object. |
int |
hashCode(boolean caseInsensitive)
Returns a hash code for this StringValue object. |
static StringValue |
Load(ExtendedDataInput in)
|
static StringValue |
LoadFromArchive(IInputArchive ar)
|
java.lang.String |
toString()
Returns a String representation of this StringValue object. |
StringValue |
truncate()
this code uses the java.lang.String.trim() code, modified to only trim the trailing whitespace |
Methods inherited from class com.crystaldecisions.reports.common.value.FormulaValue |
---|
coerce, coerceToArray, coerceToArray, coerceToBoolean, coerceToBoolean, coerceToCurrency, coerceToCurrency, coerceToDate, coerceToDate, coerceToDateTime, coerceToDateTime, coerceToNumber, coerceToNumber, coerceToRange, coerceToRange, coerceToRangeArray, coerceToRangeArray, coerceToString, coerceToTime, coerceToTime, getFormulaValueType, Load, LoadFromArchive, makeZeroValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final StringValue empty
A StringValue
object that represents an empty string.
Constructor Detail |
---|
public StringValue()
Method Detail |
---|
public static StringValue fromString(java.lang.String string)
Returns a StringValue
that represents the given String
.
string
- the String
to represent
StringValue
object or null if the String
provided is null.public abstract java.lang.String getString()
Gets a String
from this StringValue
object.
String
public int getLength()
Gets the length of this StringValue
object.
StringValue
object.
StringValue
objectpublic char getCharAt(int index)
Gets the character at the specified index.
index
- the integer used to specify the String
index
java.lang.StringIndexOutOfBoundsException
- if the index is outside of the StringValue
bounds.public java.lang.String getSubstring(int beginIndex, int endIndex)
Gets a substring from this StringValue
object.
The substring begins at the specified beginIndex
and extends to the character at index endIndex - 1
.
Therefore, the length of the substring is endIndex-beginIndex
.
beginIndex
- the index of the first character in the substringendIndex
- the index following the last character in the substring
java.lang.IndexOutOfBoundsException
- - if beginIndex
is negative or larger than endIndex
, or endIndex
is larger
than the length of this StringValue
object.public final ValueType getValueType()
Gets the ValueType
of this StringValue
object.
public FormulaValue coerceToString()
Internal use only.
coerceToString
in class FormulaValue
public boolean equals(java.lang.Object obj, boolean caseInsensitive)
Returns true
if obj
has the same class, comparator and string as this StringValue
object.
obj
- the Object
to compare this StringValue
object to
true
if obj
has the same class, comparator and string as this StringValue
object, otherwise false
public int compareTo(java.lang.Object obj, java.util.Comparator stringComparator)
Internal use only.
public int hashCode(boolean caseInsensitive)
Returns a hash code for this StringValue
object.
StringValue
object as in int
public java.lang.String toString()
Returns a String
representation of this StringValue
object. The String
is of the form: "s(the string)".
String
representation of this StringValue
objectpublic static StringValue Load(ExtendedDataInput in) throws java.io.IOException
java.io.IOException
public static StringValue LoadFromArchive(IInputArchive ar) throws ArchiveException
ArchiveException
public static java.lang.String getAsString(CrystalValue value, java.lang.String defaultValue)
public StringValue truncate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |