asSymbol
public Symbol asSymbol()
Get the corresponding non-keyword symbol.
Informally, the symbol corresponding to dropping the ':'.
isKeyword
public static boolean isKeyword(Object obj)
make
public static Keyword make(String name)
Create or find a Keyword with a given name (without final ':').
name
- the print-name of the desired Keyword
- a Keyword with the given name, newly created iff none such exist
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- readExternal in interface Symbol
readResolve
public Object readResolve()
throws ObjectStreamException
- readResolve in interface Symbol
searchForKeyword
public static Object searchForKeyword(Object[] vals,
int offset,
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.)
vals
- the list to search inoffset
- the index in vals to start the search atkeyword
- the keyword to search for
- 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 Object searchForKeyword(Object[] vals,
int offset,
Object keyword,
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.)
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 match
- 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(ObjectOutput out)
throws IOException
- writeExternal in interface Symbol