public class Percent extends Object implements UnaryOperator
Constructor and Description |
---|
Percent()
Creates a new percent operator.
|
Modifier and Type | Method and Description |
---|---|
Value |
applyTo(Expression operand)
Returns the operand's value divided by 100.
|
String |
getIdentifier()
Returns the operator's string identirifer.
|
Value.Type |
getOperandValueType()
Returns the type of value that the operator's operands can have.
|
boolean |
isPrefix()
Returns whether the operator is a prefix operator, i.e. it appears
before its operand.
|
String |
toString() |
public Percent()
public Value applyTo(Expression operand) throws IllegalValueTypeException
applyTo
in interface UnaryOperator
IllegalValueTypeException
- if the value of the operand is not numericpublic String getIdentifier()
Operator
getIdentifier
in interface Operator
public boolean isPrefix()
UnaryOperator
isPrefix
in interface UnaryOperator
public Value.Type getOperandValueType()
Operator
getOperandValueType
in interface Operator