|
|||||||||
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.RangeValue
public final class RangeValue
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.
Method Summary | |
---|---|
FormulaValue |
coerceToCurrency()
Internal use only. |
FormulaValue |
coerceToDate()
Internal use only. |
FormulaValue |
coerceToDateTime()
Internal use only. |
FormulaValue |
coerceToNumber()
Internal use only. |
FormulaValue |
coerceToRange()
Internal use only. |
FormulaValue |
coerceToString()
Internal use only. |
FormulaValue |
coerceToTime()
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 and values as this RangeValue object. |
static RangeValue |
fromSingleValue(FormulaValue value)
Returns a RangeValue object that represents the given FormulaValue object. |
static RangeValue |
fromStartAndEndValues(FormulaValue startValue,
FormulaValue endValue,
boolean includeStart,
boolean includeEnd)
Returns a RangeValue object with the given startValue and endValue values. |
int |
getEncodedSize(ValueType type)
|
int |
getEncodedSizeForArchive(ValueType type)
|
FormulaValue |
getEndValue()
Returns the end value. |
boolean |
getIncludeEnd()
Checks if the end value is included in the range. |
boolean |
getIncludeStart()
Checks if the start value is included in the range. |
FormulaValue |
getStartValue()
Gets the start value. |
ValueType |
getValueType()
Gets the ValueType of this RangeValue object. |
int |
hashCode(boolean caseInsensitive)
Returns a hash code for this RangeValue object. |
static RangeValue |
Load(ValueType type,
ExtendedDataInput in)
|
static RangeValue |
LoadFromArchive(ValueType type,
IInputArchive ar)
|
void |
store(ValueType type,
ExtendedDataOutput out)
|
void |
storeToArchive(ValueType type,
IOutputArchive ar)
|
FormulaValue |
toSingleValue()
Returns the single value if both endpoints are the same value, otherwise null. |
java.lang.String |
toString()
Returns a String representation of this RangeValue object. |
Methods inherited from class com.crystaldecisions.reports.common.value.FormulaValue |
---|
coerce, coerceToArray, coerceToArray, coerceToBoolean, coerceToBoolean, coerceToCurrency, coerceToDate, coerceToDateTime, coerceToNumber, coerceToRange, coerceToRangeArray, coerceToRangeArray, coerceToString, coerceToTime, getFormulaValueType, makeZeroValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static RangeValue fromStartAndEndValues(FormulaValue startValue, FormulaValue endValue, boolean includeStart, boolean includeEnd)
Returns a RangeValue
object with the given startValue
and endValue
values.
startValue
- The start value for the range. If null, the start of the range is unbounded.endValue
- The end value for the range. If null, the end of the range is unbounded.includeStart
- set to true
to include the startValue
in the rangeincludeEnd
- set to true
, to include the endValue
in the range
RangeValue
object with the given startValue
and endValue
values
java.lang.IllegalArgumentException
- if the start and end values are not of the same class,
or if the start or end value has a Range or Array ValueType,
or if the start and end values are equal and are not both included
java.lang.NullPointerException
- if both start and end values are nullpublic static RangeValue fromSingleValue(FormulaValue value)
Returns a RangeValue
object that represents the given FormulaValue
object.
value
- the FormulaValue
object to represent
RangeValue
object with both endpoints included and set to the given value
java.lang.IllegalArgumentException
- if the value is a range or an array
java.lang.NullPointerException
- if both the start and end values are nullpublic void store(ValueType type, ExtendedDataOutput out) throws java.io.IOException
java.io.IOException
public void storeToArchive(ValueType type, IOutputArchive ar) throws ArchiveException
ArchiveException
public static RangeValue LoadFromArchive(ValueType type, IInputArchive ar) throws ArchiveException
ArchiveException
public static RangeValue Load(ValueType type, ExtendedDataInput in) throws java.io.IOException
java.io.IOException
public int getEncodedSizeForArchive(ValueType type)
public int getEncodedSize(ValueType type)
public FormulaValue coerceToNumber()
Internal use only.
coerceToNumber
in class FormulaValue
public FormulaValue coerceToCurrency()
Internal use only.
coerceToCurrency
in class FormulaValue
public FormulaValue coerceToDate()
Internal use only.
coerceToDate
in class FormulaValue
public FormulaValue coerceToTime()
Internal use only.
coerceToTime
in class FormulaValue
public FormulaValue coerceToDateTime()
Internal use only.
coerceToDateTime
in class FormulaValue
public FormulaValue coerceToString()
Internal use only.
coerceToString
in class FormulaValue
public FormulaValue coerceToRange()
Internal use only.
coerceToRange
in class FormulaValue
public FormulaValue toSingleValue()
Returns the single value if both endpoints are the same value, otherwise null.
public FormulaValue getStartValue()
Gets the start value.
public FormulaValue getEndValue()
Returns the end value.
public boolean getIncludeStart()
Checks if the start value is included in the range.
true
if the start value is included in the range, otherwise false
public boolean getIncludeEnd()
Checks if the end value is included in the range.
true
if the end value is included in the range, otherwise false
public ValueType getValueType()
Gets the ValueType
of this RangeValue
object.
ValueType
of this RangeValue
objectpublic boolean equals(java.lang.Object obj, boolean caseInsensitive)
Returns true
if obj
has the same class and values as this RangeValue
object.
obj
- the Object
to compare this RangeValue
object to
true
if obj
has the same class and values as this RangeValue
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 RangeValue
object.
int
public java.lang.String toString()
Returns a String
representation of this RangeValue
object. The String
is of the form: "r([includeStart][start]..[end][includeEnd])" where:
- [start] is the string representation of the start value
- [end] is the string representation of the end value
- [includeStart] is "[" if includeStart
is true
, otherwise "("
- [includeEnd] is "]" if includeEnd
is true
, otherwise ")"
String
representation of this RangeValue
object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |