gnu.expr
Class Keyword
java.lang.Object
   gnu.mapping.Symbol
gnu.mapping.Symbol
       gnu.expr.Keyword
gnu.expr.Keyword
- All Implemented Interfaces: 
- EnvironmentKey, Printable, java.io.Externalizable, java.io.Serializable, java.lang.Comparable
- public class Keyword 
- extends Symbol- implements Printable, java.io.Externalizable
- See Also:
- Serialized Form
 
 
 
| Method Summary | 
| static boolean | isKeyword(java.lang.Object obj)
 | 
| static Keyword | make(java.lang.String name)Create or find a Keyword with a given name (without final ':').
 | 
|  void | print(java.io.PrintWriter ps)
 | 
|  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)
 | 
 
| Methods inherited from class gnu.mapping.Symbol | 
| compareTo, equals, getKeyProperty, getKeySymbol, getLocalName, getName, getNamespace, getNamespaceURI, hasEmptyNamespace, hashCode, make, matches, matches, setNamespace | 
 
| Methods inherited from class java.lang.Object | 
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
 
keywordNamespace
public static final Namespace keywordNamespace
Keyword
public Keyword()
make
public static Keyword make(java.lang.String name)
- Create or find a Keyword with a given name (without final ':').
 
- 
 
- 
- Parameters:
- name- the print-name of the desired Keyword
- Returns:
- a Keyword with the given name, newly created iff none such exist
 
isKeyword
public static boolean isKeyword(java.lang.Object obj)
- 
 
- 
 
toString
public final java.lang.String toString()
- 
- Overrides:
- toStringin class- Symbol
 
- 
 
print
public void print(java.io.PrintWriter ps)
- 
- Specified by:
- printin interface- Printable
- Overrides:
- printin class- Symbol
 
- 
 
searchForKeyword
public static java.lang.Object searchForKeyword(java.lang.Object[] vals,
                                                int offset,
                                                java.lang.Object keyword)
- Search vals[0:offset-1] for a keyword.
 Each key at vals[i] is followed by a value at keys[i+1].
 (This is used to search for a keyword parameter in an argument list.)
 
- 
 
- 
- Parameters:
- vals- the list to search in
- offset- the index in vals to start the search at
- keyword- the keyword to search for
- Returns:
- vals[i+1] such that vals[i]==keyword (and (i-offset) is even
 and non-negative);  if there is no such i, return Special.dfault.
 
searchForKeyword
public 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.
 Each key at vals[i] is followed by a value at keys[i+1].
 (This is used to search for a keyword parameter in an argument list.)
 
- 
 
- 
- Parameters:
- vals- the list to search in
- offset- the index in vals to start the search at
- keyword- the keyword to search for
- dfault- the value to return if there is no match
- Returns:
- vals[i+1] such that vals[i]==keyword (and (i-offset) is even
 and non-negative);  if there is no such i, return dfault.
 
writeExternal
public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
- 
- Specified by:
- writeExternalin interface- java.io.Externalizable
- Overrides:
- writeExternalin class- Symbol
 
- 
- Throws:
- java.io.IOException
 
readExternal
public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
- 
- Specified by:
- readExternalin interface- java.io.Externalizable
- Overrides:
- readExternalin class- Symbol
 
- 
- Throws:
- java.io.IOException
- java.lang.ClassNotFoundException
 
readResolve
public java.lang.Object readResolve()
                             throws java.io.ObjectStreamException
- 
- Overrides:
- readResolvein class- Symbol
 
- 
- Throws:
- java.io.ObjectStreamException