public class Keyword extends Symbol implements 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 |
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, valueOf
public 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.Externalizable
writeExternal
in class Symbol
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class Symbol
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.Object readResolve() throws java.io.ObjectStreamException
readResolve
in class Symbol
java.io.ObjectStreamException