|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--ptolemy.data.Token
|
+--ptolemy.data.ScalarToken
|
+--ptolemy.data.LongToken
A token that contains an long integer.
| Fields inherited from class ptolemy.data.ScalarToken |
_unitCategoryExponents |
| Constructor Summary | |
LongToken()
Construct a token with long integer 0. |
|
LongToken(long value)
Construct a token with the specified value. |
|
LongToken(java.lang.String init)
Construct a token from the given String. |
|
| Method Summary | |
ScalarToken |
absolute()
Return a LongToken containing the absolute value of the value of this token. |
Token |
add(Token token)
Return a new token whose value is the sum of this token and the argument. |
Token |
addReverse(Token token)
Return a new token whose value is the sum of this token and the argument. |
static Token |
convert(Token token)
Convert the specified token into an instance of LongToken. |
Token |
divide(Token divisor)
Return a new Token whose value is the value of this token divided by the value of the argument token. |
Token |
divideReverse(Token dividend)
Return a new Token whose value is the value of the argument token divided by the value of this token. |
boolean |
equals(java.lang.Object object)
Return true if the argument is an instance of LongToken with the same value. |
Type |
getType()
Return the type of this token. |
int |
hashCode()
Return a hash code value for this token. |
BooleanToken |
isEqualTo(Token token)
Test the values of this Token and the argument Token for equality. |
BooleanToken |
isLessThan(ScalarToken arg)
Check if the value of this token is strictly less than that of the argument token. |
long |
longValue()
Return the value in the token as a long. |
Token |
modulo(Token token)
Return a new Token whose value is the value of this token modulo the value of the argument token. |
Token |
moduloReverse(Token token)
Return a new Token whose value is the value of the argument token modulo the value of this token. |
Token |
multiply(Token rightFactor)
Return a new Token whose value is the value of this Token multiplied by the value of the argument Token. |
Token |
multiplyReverse(Token leftFactor)
Return a new Token whose value is the value of the argument Token multiplied by the value of this Token. |
Token |
one()
Returns a new LongToken with value 1. |
Token |
subtract(Token rightArgument)
Return a new Token whose value is the value of the argument Token subtracted from the value of this Token. |
Token |
subtractReverse(Token leftArgument)
Return a new Token whose value is the value of this Token subtracted from 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. |
Token |
zero()
Returns a new LongToken with value 0. |
| Methods inherited from class ptolemy.data.ScalarToken |
_addCategoryExponents, _areUnitsEqual, _copyOfCategoryExponents, _isUnitless, _subtractCategoryExponents, complexValue, doubleValue, fixValue, intValue, inUnitsOf, setUnitCategory, unitsString |
| Methods inherited from class ptolemy.data.Token |
_notSupportedMessage, isCloseTo, isCloseTo |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LongToken()
public LongToken(long value)
public LongToken(java.lang.String init)
throws IllegalActionException
IllegalActionException - If the Token could not
be created with the given String.| Method Detail |
public ScalarToken absolute()
absolute in class ScalarToken
public Token add(Token token)
throws IllegalActionException
add in class Tokentoken - The token to add to this Token.IllegalActionException - If the passed token
is not of a type that can be added to this Tokens value.
public Token addReverse(Token token)
throws IllegalActionException
addReverse in class Tokentoken - The token to add this Token to.IllegalActionException - If the passed token
is not of a type that can be added to this Tokens value.
public static Token convert(Token token)
throws IllegalActionException
token - The token to be converted to a LongToken.IllegalActionException - If the conversion
cannot be carried out.
public Token divide(Token divisor)
throws IllegalActionException
divide in class Tokendivisor - The token to divide this Token byIllegalActionException - If the passed token is
not of a type that can be divide this Tokens value by.
public Token divideReverse(Token dividend)
throws IllegalActionException
divideReverse in class Tokendividend - The token to be divided by the value of this Token.IllegalActionException - If the passed token
is not of a type that can be divided by this Tokens value.public boolean equals(java.lang.Object object)
equals in class Tokenobject - An instance of Object.public Type getType()
getType in class ScalarTokenpublic int hashCode()
hashCode in class Token
public BooleanToken isEqualTo(Token token)
throws IllegalActionException
isEqualTo in class Tokentoken - The token to test equality of this token with.IllegalActionException - If the passed token is
not of a type that can be compared with this Tokens value.
public BooleanToken isLessThan(ScalarToken arg)
throws IllegalActionException
isLessThan in class ScalarTokenarg - A ScalarToken.IllegalActionException - If the type of the argument token
is incomparable with the type of this token.public long longValue()
longValue in class ScalarTokenptolemy.data.ScalarTokenIllegalActionException - Always thrown.
public Token modulo(Token token)
throws IllegalActionException
modulo in class Tokentoken - The token to modulo this Token by.IllegalActionException - If the passed token is
not of a type that can be used with modulo.
public Token moduloReverse(Token token)
throws IllegalActionException
moduloReverse in class Tokentoken - The token to apply modulo to by the value of this Token.IllegalActionException - If the passed token
is not of a type that can apply modulo by this Tokens value.
public Token multiply(Token rightFactor)
throws IllegalActionException
multiply in class TokenrightFactor - The token to multiply this Token by.IllegalActionException - If the passed token is
not of a type that can be multiplied to this Tokens value.
public Token multiplyReverse(Token leftFactor)
throws IllegalActionException
multiplyReverse in class TokenleftFactor - The token to be multiplied by the value of
this Token.IllegalActionException - If the passed token
is not of a type that can be multiplied by this Tokens value.public Token one()
one in class Token
public Token subtract(Token rightArgument)
throws IllegalActionException
subtract in class TokenrightArgument - The token to subtract to this Token.IllegalActionException - If the passed token is
not of a type that can be subtracted from this Tokens value.
public Token subtractReverse(Token leftArgument)
throws IllegalActionException
subtractReverse in class TokenleftArgument - The token to add this Token to.IllegalActionException - If the passed token
is not of a type that can be added to this Tokens value.public java.lang.String toString()
toString in class Tokenpublic Token zero()
zero in class Token
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||