public class XMLToken extends Token
Red (cxh) |
Red (neuendor) |
Constructor and Description |
---|
XMLToken()
Construct an empty token.
|
XMLToken(java.lang.String init)
Construct an XmlToken from the specified string.
|
Modifier and Type | Method and Description |
---|---|
protected BooleanToken |
_isCloseTo(Token rightArgument,
double epsilon)
Test for closeness of the values of this Token and the argument
Token.
|
protected BooleanToken |
_isEqualTo(Token rightArgument)
Test for equality of the values of this Token and the argument
Token.
|
static XMLToken |
convert(Token token)
Convert the specified token into an instance of XMLToken.
|
boolean |
equals(java.lang.Object object)
Return true if the argument is an instance of XMLToken with the
same value.
|
org.w3c.dom.Document |
getDomTree()
Return the dom document parsed from the xml string.
|
Type |
getType()
Return the type of this token.
|
int |
hashCode()
Return the hash code for the XMLToken object.
|
BooleanToken |
isCloseTo(Token token,
double epsilon)
Test that the value of this token is close to the first argument,
where "close" means that the distance between them is less than
or equal to the second argument.
|
java.lang.String |
toString()
Return the value of this Token as a string.
|
add, addReverse, divide, divideReverse, isCloseTo, isEqualTo, isNil, modulo, moduloReverse, multiply, multiplyReverse, notSupportedConversionMessage, notSupportedIncomparableConversionMessage, notSupportedIncomparableMessage, notSupportedMessage, notSupportedNullNilStringMessage, one, pow, subtract, subtractReverse, zero, zeroReturnType
public XMLToken()
public XMLToken(java.lang.String init) throws java.lang.Exception
init
- The initialization string.java.lang.Exception
- If the string is not parsable.public static XMLToken convert(Token token) throws IllegalActionException
token
- The token to be converted to a XMLToken.IllegalActionException
- If the conversion
cannot be carried out.public org.w3c.dom.Document getDomTree()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- An instance of Object.public int hashCode()
hashCode
in class java.lang.Object
public final BooleanToken isCloseTo(Token token, double epsilon) throws IllegalActionException
Subclasses should not generally override this method, but override the protected _isCloseTo() method to ensure that type conversion is performed consistently.
isCloseTo
in class Token
token
- The token to test closeness of this token with.epsilon
- The value that we use to determine whether two
tokens are close.IllegalActionException
- If the argument token and
this token are of incomparable types, or the operation does
not make sense for the given types.public Type getType()
public java.lang.String toString()
protected BooleanToken _isCloseTo(Token rightArgument, double epsilon) throws IllegalActionException
rightArgument
- The token to add to this token.epsilon
- The value that we use to determine whether two
tokens are close. This parameter is ignored by this class.IllegalActionException
- If this method is not
supported by the derived class.protected BooleanToken _isEqualTo(Token rightArgument) throws IllegalActionException
rightArgument
- The token to add to this token.IllegalActionException
- If this method is not
supported by the derived class.