|
||||||||||
| 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
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)
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.
|
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()
Returns a hash code for this RangeValue object.
|
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 |
getClass, 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 FormulaValue coerceToNumber()
Internal use only.
coerceToNumber in class FormulaValuepublic FormulaValue coerceToCurrency()
Internal use only.
coerceToCurrency in class FormulaValuepublic FormulaValue coerceToDate()
Internal use only.
coerceToDate in class FormulaValuepublic FormulaValue coerceToTime()
Internal use only.
coerceToTime in class FormulaValuepublic FormulaValue coerceToDateTime()
Internal use only.
coerceToDateTime in class FormulaValuepublic FormulaValue coerceToString()
Internal use only.
coerceToString in class FormulaValuepublic FormulaValue coerceToRange()
Internal use only.
coerceToRange in class FormulaValuepublic 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 falsepublic boolean getIncludeEnd()
Checks if the end value is included in the range.
true if the end value is included in the range, otherwise falsepublic ValueType getValueType()
Gets the ValueType of this RangeValue object.
ValueType of this RangeValue objectpublic boolean equals(java.lang.Object obj)
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()
Returns a hash code for this RangeValue object.
intpublic 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 | |||||||||