Package oracle.rules.sdk2.dictionary
Class AbstractVerbalChoice
java.lang.Object
oracle.rules.sdk2.dictionary.AbstractChoiceImpl
oracle.rules.sdk2.dictionary.AbstractVerbalChoice
- All Implemented Interfaces:
Serializable,Cloneable,Choice,VerbalChoice
- Direct Known Subclasses:
AbstractPermutedChoice,VerbalChoiceImpl
public abstract class AbstractVerbalChoice
extends AbstractChoiceImpl
implements VerbalChoice, Cloneable
Base Class for a VerbalChoice implementation.
NOTES:
1. A VerbalChoice would not have a Name but only a Value. The Name and Translated Name
of a VerbalChoice would always be "".
2. The Verbal Value of a VerbalChoice would be the same as its Value
- Since:
- 12.1.2
- Author:
- Ganesh RK
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface oracle.rules.sdk2.dictionary.Choice
Choice.Kind -
Field Summary
Fields inherited from interface oracle.rules.sdk2.dictionary.VerbalChoice
VERBAL_CHOICE_EXPR, VERBAL_CHOICE_TYPE, VERBAL_CHOICE_VAR -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpression(String paramValue) Adds an Expression to the VerbalChoice if and only ifVerbalChoice.canAddExpression()is true.voidaddExpression(Choice choice) Adds an Expression to the VerbalChoice if and only ifVerbalChoice.canAddExpression()is true.booleanCan be used to check if Expressions can be added to this VerbalChoicebooleanCan be used to check if Expressions can be removed from this VerbalChoicebooleangetName(boolean translate) Get the name of the choice, typically the last component of the value, relative to the parentGet the translated name of the choice, or null of noneGet a tokenizer to compute the display value of the VerbalChoice.getVerbalValue(boolean translate) Get the (optionally translated) 'Verbal' value of the choiceinthashCode()booleanDoes this VerbalChoice represent a new DefinitionvoidRemoves an expression from the VerbalChoice if and only ifVerbalChoice.canRemoveExpression(oracle.rules.sdk2.dictionary.VerbalChoiceToken)is true and there are more than two Expressions.toString()Methods inherited from class oracle.rules.sdk2.dictionary.AbstractChoiceImpl
getAltValue, getChildren, getDefinition, getDescription, getDescription, getID, getKind, getListContentType, getListContentType, getListContentTypeID, getLiteralValue, getName, getParent, getTranslatedName, getTranslatedValue, getTranslatedValue, getType, getType, getTypeID, getValue, getValue, getVerbalValue, isAssignable, isAssignablePrefix, isExpanded, isGlobal, isQualified, isSelectable, isStatic, isTestable, setDefinition, setName, setSelectableMethods inherited from interface oracle.rules.sdk2.dictionary.Choice
getAltValue, getChildren, getDefinition, getDescription, getDescription, getID, getKind, getListContentType, getListContentType, getListContentTypeID, getLiteralValue, getName, getParent, getTranslatedName, getTranslatedValue, getTranslatedValue, getType, getType, getTypeID, getValue, getValue, getVerbalValue, isAssignable, isAssignablePrefix, isExpanded, isGlobal, isQualified, isSelectable, isStatic, isTestableMethods inherited from interface oracle.rules.sdk2.dictionary.VerbalChoice
getSimilarChoices, hasParameters
-
Method Details
-
getName
Description copied from interface:ChoiceGet the name of the choice, typically the last component of the value, relative to the parent- Specified by:
getNamein interfaceChoice- Overrides:
getNamein classAbstractChoiceImpl- Parameters:
translate- flag to translate the name- Returns:
- name
-
getTranslatedName
Description copied from class:AbstractChoiceImplGet the translated name of the choice, or null of none- Overrides:
getTranslatedNamein classAbstractChoiceImpl- Returns:
- translated name, or ""
-
getVerbalValue
Description copied from class:AbstractChoiceImplGet the (optionally translated) 'Verbal' value of the choice- Specified by:
getVerbalValuein interfaceChoice- Overrides:
getVerbalValuein classAbstractChoiceImpl- Parameters:
translate- flag to optionally translate the value- Returns:
- 'Verbal' value of this Choice if any, "" Otherwise
-
getDictionary
- Overrides:
getDictionaryin classAbstractChoiceImpl
-
getVerbalChoiceTokenizer
Description copied from interface:VerbalChoiceGet a tokenizer to compute the display value of the VerbalChoice. Tokens can be used to identify expressions and variables and to set their values in the VerbalChoice.- Specified by:
getVerbalChoiceTokenizerin interfaceVerbalChoice- Returns:
- VerbalChoiceTokenizer
-
canAddExpression
public boolean canAddExpression()Description copied from interface:VerbalChoiceCan be used to check if Expressions can be added to this VerbalChoice- Specified by:
canAddExpressionin interfaceVerbalChoice- Returns:
- true if this VerbalChoice is for a SimpleTest and has the [in] operator, false otherwise
-
canRemoveExpression
Description copied from interface:VerbalChoiceCan be used to check if Expressions can be removed from this VerbalChoice- Specified by:
canRemoveExpressionin interfaceVerbalChoice- Parameters:
token- Token representing the Expression to be removed- Returns:
- true if this VerbalChoice is for a SimpleTest and has the [in] operator and has more than 2 expressions, false otherwise
-
addExpression
Description copied from interface:VerbalChoiceAdds an Expression to the VerbalChoice if and only ifVerbalChoice.canAddExpression()is true. Else, this is a no-op. Adding an Expression resets the VerbalChoice. To obtain the new display value for the VerbalChoice, MUST iterate through theVerbalChoiceTokenizerfrom the beginning- Specified by:
addExpressionin interfaceVerbalChoice- Parameters:
paramValue- Expression Value
-
addExpression
Description copied from interface:VerbalChoiceAdds an Expression to the VerbalChoice if and only ifVerbalChoice.canAddExpression()is true. Else, this is a no-op. Adding an Expression resets the VerbalChoice. To obtain the new display value for the VerbalChoice, MUST iterate through theVerbalChoiceTokenizerfrom the beginning- Specified by:
addExpressionin interfaceVerbalChoice- Parameters:
choice- Choice representing the Expression Value
-
removeExpression
Description copied from interface:VerbalChoiceRemoves an expression from the VerbalChoice if and only ifVerbalChoice.canRemoveExpression(oracle.rules.sdk2.dictionary.VerbalChoiceToken)is true and there are more than two Expressions. Else, this is a no-op. Removing an Expression resets the VerbalChoice. To obtain the new display value for the VerbalChoice, MUST iterate through theVerbalChoiceTokenizerfrom the beginning- Specified by:
removeExpressionin interfaceVerbalChoice- Parameters:
token- Token representing the Expression to be removed
-
isNewDefinition
public boolean isNewDefinition()Description copied from interface:VerbalChoiceDoes this VerbalChoice represent a new Definition- Specified by:
isNewDefinitionin interfaceVerbalChoice- Returns:
- true if the VerbalChoice represents a new Definition, false otherwise
-
toString
- Overrides:
toStringin classAbstractChoiceImpl
-
equals
- Overrides:
equalsin classAbstractChoiceImpl
-
hashCode
public int hashCode()
-