@Deprecated public class StringLiteralNode extends Object implements DataNode
NumberLiteralNode
object is a node in a
LogicalPropositionTree
that represents a literal
number. It can evaluate to a number.
A literal string is string in the form
"
.*"
that evaluates to the
string contained in the quotes ("
s).Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Modifier and Type | Field and Description |
---|---|
private String |
string
Deprecated.
The string value of this node.
|
Constructor and Description |
---|
StringLiteralNode(String newString)
Deprecated.
Creates a new
StringLiteralNode with the given string value. |
Modifier and Type | Method and Description |
---|---|
BigDecimal |
getNumber(PropertiesMap map)
Deprecated.
Retrieves this node's numerical value.
|
String |
getString(PropertiesMap map)
Deprecated.
Retrieves this node's numerical value.
|
boolean |
isANumber(PropertiesMap map)
Deprecated.
Determines whether this node can evaluate to a number with the given
context.
|
boolean |
isAString(PropertiesMap map)
Deprecated.
Determines whether this node can evaluate to a string with the given
context.
|
private String string
public StringLiteralNode(String newString)
StringLiteralNode
with the given string value.newString
- The string value of the new node.public boolean isANumber(PropertiesMap map)
false
always.public boolean isAString(PropertiesMap map)
true
always.public BigDecimal getNumber(PropertiesMap map) throws LogicalPropositionTreeException
getNumber
in interface DataNode
map
- The context within which we are evaluating the numerical value.
Does not affect the result of this call since this node has a constant
value.LogicalPropositionTreeException
- Since this node has only a
string value.public String getString(PropertiesMap map)
String
containing the string value of this node.