|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.data.Token
ptolemy.data.AbstractConvertibleToken
ptolemy.data.BooleanToken
| Field Summary | |
static BooleanToken |
FALSE
False-valued token. |
static BooleanToken |
TRUE
True-valued token. |
| Constructor Summary | |
BooleanToken()
Construct a token with value false |
|
BooleanToken(boolean b)
Construct a token with the specified value. |
|
BooleanToken(java.lang.String init)
Construct a token with the specified string. |
|
| Method Summary | |
protected Token |
_add(Token rightArgument)
Return a new token whose value is the value of the argument Token added to the value of this Token. |
protected Token |
_divide(Token rightArgument)
Return a new token whose value is the value of the argument Token added to the value of this Token. |
protected BooleanToken |
_isCloseTo(Token token,
double epsilon)
Return a true-valued token if the first argument is close to this token, where in this class, "close" means "identical to." |
protected BooleanToken |
_isEqualTo(Token token)
Test for equality of the values of this token and the argument. |
protected Token |
_modulo(Token rightArgument)
Return a new token whose value is the value of this token modulo the value of the argument token. |
protected Token |
_multiply(Token rightArgument)
Return a new token whose value is the value of this token multiplied by the value of the argument token. |
protected Token |
_subtract(Token rightArgument)
Subtraction is not supported in Boolean algebras. |
BooleanToken |
and(BooleanToken rightArgument)
Return a new token whose value is the logical AND of the value of this token and the the value of the argument token. |
BitwiseOperationToken |
bitwiseAnd(Token rightArgument)
Returns a token representing the bitwise AND of this token and the given token. |
BitwiseOperationToken |
bitwiseNot()
Returns a token representing the bitwise NOT of this token. |
BitwiseOperationToken |
bitwiseOr(Token rightArgument)
Returns a token representing the bitwise OR of this token and the given token. |
BitwiseOperationToken |
bitwiseXor(Token rightArgument)
Returns a token representing the bitwise XOR of this token and the given token. |
boolean |
booleanValue()
Return the value as a boolean. |
static BooleanToken |
convert(Token token)
Convert the specified token into an instance of BooleanToken. |
boolean |
equals(java.lang.Object object)
Return true if the argument's class is BooleanToken and it has the same values as this token. |
static BooleanToken |
getInstance(boolean value)
Return the instance of this class corresponding to the given boolean value. |
Type |
getType()
Return the type of this token. |
int |
hashCode()
Return a hash code value for this token. |
BooleanToken |
not()
Return a new BooleanToken with the logical not of the value stored in this token. |
Token |
one()
Returns a token representing the multiplicative identity. |
BooleanToken |
or(BooleanToken rightArgument)
Return a new token whose value is the logical OR of the value of this token and the the value of the argument token. |
java.lang.String |
toString()
Return the value of this token as a string that can be parsed by the expression language to recover a token with the same value. |
BooleanToken |
xor(BooleanToken rightArgument)
Return a new token whose value is the logical XOR of the value of this token and the the value of the argument token. |
Token |
zero()
Returns a token representing the additive identity. |
| Methods inherited from class ptolemy.data.AbstractConvertibleToken |
add, addReverse, divide, divideReverse, isCloseTo, isEqualTo, modulo, moduloReverse, multiply, multiplyReverse, subtract, subtractReverse |
| Methods inherited from class ptolemy.data.Token |
isCloseTo, notSupportedConversionMessage, notSupportedIncomparableConversionMessage, notSupportedIncomparableMessage, notSupportedMessage, pow, zeroReturnType |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static BooleanToken TRUE
public static BooleanToken FALSE
| Constructor Detail |
public BooleanToken()
public BooleanToken(boolean b)
public BooleanToken(java.lang.String init)
throws IllegalActionException
IllegalActionException - If the token could not
be created with the given String.| Method Detail |
public BooleanToken and(BooleanToken rightArgument)
rightArgument - The BooleanToken to OR with this one.
public BitwiseOperationToken bitwiseAnd(Token rightArgument)
throws IllegalActionException
bitwiseAnd in interface BitwiseOperationTokenIllegalActionException - If the given token is not
compatible for this operation, or the operation does not make
sense for this type.public BitwiseOperationToken bitwiseNot()
bitwiseNot in interface BitwiseOperationToken
public BitwiseOperationToken bitwiseOr(Token rightArgument)
throws IllegalActionException
bitwiseOr in interface BitwiseOperationTokenIllegalActionException - If the given token is not
compatible for this operation, or the operation does not make
sense for this type.
public BitwiseOperationToken bitwiseXor(Token rightArgument)
throws IllegalActionException
bitwiseXor in interface BitwiseOperationTokenIllegalActionException - If the given token is not
compatible for this operation, or the operation does not make
sense for this type.public boolean booleanValue()
public static BooleanToken convert(Token token)
throws IllegalActionException
token - The token to be converted to a BooleanToken.
IllegalActionException - If the argument is not
a BooleanToken.public boolean equals(java.lang.Object object)
object - An instance of Object.
public static BooleanToken getInstance(boolean value)
public Type getType()
getType in class Tokenpublic int hashCode()
public BooleanToken not()
public Token one()
one in class Tokenpublic BooleanToken or(BooleanToken rightArgument)
rightArgument - The BooleanToken to OR with this one.
public java.lang.String toString()
toString in class Tokenpublic BooleanToken xor(BooleanToken rightArgument)
rightArgument - The BooleanToken to XOR with this one.
public Token zero()
zero in class Tokenprotected Token _add(Token rightArgument)
_add in class AbstractConvertibleTokenrightArgument - The token to add to this token.
protected Token _divide(Token rightArgument)
throws IllegalActionException
_divide in class AbstractConvertibleTokenrightArgument - The token to divide this token by
IllegalActionException - If the argument token is
FALSE.
protected BooleanToken _isCloseTo(Token token,
double epsilon)
_isCloseTo in class AbstractConvertibleTokentoken - The token to compare to this token.
protected BooleanToken _isEqualTo(Token token)
_isEqualTo in class AbstractConvertibleTokentoken - The token to compare to this token.
protected Token _modulo(Token rightArgument)
throws IllegalActionException
_modulo in class AbstractConvertibleTokenrightArgument - The token to modulo this token by.
IllegalActionException - If this method is not
supported by the derived class.
protected Token _multiply(Token rightArgument)
throws IllegalActionException
_multiply in class AbstractConvertibleTokenrightArgument - The token to multiply this token by.
IllegalActionException - If this method is not
supported by the derived class.
protected Token _subtract(Token rightArgument)
throws IllegalActionException
_subtract in class AbstractConvertibleTokenrightArgument - The token to subtract from this token.
IllegalActionException - If this method is not
supported by the derived class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||