public class Keyword extends Symbol implements Printable, java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
static Namespace |
keywordNamespace |
| Constructor and Description |
|---|
Keyword() |
Keyword(Namespace namespace,
java.lang.String name)
Used for constructing literals (int gnu.expr.LitTable).
|
| Modifier and Type | Method and Description |
|---|---|
Symbol |
asSymbol()
Get the corresponding non-keyword symbol.
|
static boolean |
isKeyword(java.lang.Object obj)
Test whether an object is a keyword.
|
static Keyword |
make(java.lang.String name)
Create or find a Keyword with a given name (without ':').
|
void |
print(Consumer out) |
void |
readExternal(java.io.ObjectInput in) |
java.lang.Object |
readResolve() |
static java.lang.Object |
searchForKeyword(java.lang.Object[] vals,
int offset,
java.lang.Object keyword)
Search vals[0:offset-1] for a keyword.
|
static java.lang.Object |
searchForKeyword(java.lang.Object[] vals,
int offset,
java.lang.Object keyword,
java.lang.Object dfault)
Search vals[0:offset-1] for a keyword.
|
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out) |
compareTo, equals, equals, getKeyProperty, getKeySymbol, getLocalName, getLocalPart, getName, getNamespace, getNamespaceURI, getPrefix, hasEmptyNamespace, hashCode, hasUnknownNamespace, make, make, makeUninterned, makeUninterned, makeWithUnknownNamespace, matches, matches, parse, setNamespace, toString, valueOf, valueOf, valueOfpublic static final Namespace keywordNamespace
public Keyword()
public Keyword(Namespace namespace, java.lang.String name)
public Symbol asSymbol()
public static Keyword make(java.lang.String name)
name - the print-name of the desired Keywordpublic static boolean isKeyword(java.lang.Object obj)
obj - the object to test.true if the object is a keyword, false otherwise.public static java.lang.Object searchForKeyword(java.lang.Object[] vals,
int offset,
java.lang.Object keyword)
vals - the list to search inoffset - the index in vals to start the search atkeyword - the keyword to search forpublic static java.lang.Object searchForKeyword(java.lang.Object[] vals,
int offset,
java.lang.Object keyword,
java.lang.Object dfault)
vals - the list to search inoffset - the index in vals to start the search atkeyword - the keyword to search fordfault - the value to return if there is no matchpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class Symboljava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class Symboljava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic java.lang.Object readResolve()
throws java.io.ObjectStreamException
readResolve in class Symboljava.io.ObjectStreamException