|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsdsi.sexp.Sexp jsdsi.sexp.SexpList
A parenthesized list of S-expressions, where the first element is always a SexpString and is called the list's "type".
Sexp
,
SexpString
,
Serialized FormField Summary |
Fields inherited from class jsdsi.sexp.Sexp |
base64Digit, hexDigit |
Constructor Summary | |
SexpList(SexpString type,
Sexp[] expressions)
Creates a new list from a type string and an array of S-expressions. |
Method Summary | |
java.lang.String |
getType()
Returns the type of this list. |
boolean |
isEmpty()
Returns true if this list is empty
(i.e., only has a type), false otherwise. |
java.util.Iterator |
iterator()
Returns an iterator over this list, including its type. |
int |
size()
Returns the size of this list, including its type. |
void |
writeCanonical(java.io.OutputStream out)
Writes this S-expression to a byte stream in canonical form. |
void |
writeReadable(java.io.Writer out,
int offset,
int width,
int last)
Writes this S-expression to a character stream in readable form. |
Methods inherited from class jsdsi.sexp.Sexp |
decodeString, encodeString, getEncoding, getReadableLen, isBase64Digit, isDecimalDigit, isHexDigit, isTokenChar, isWhiteSpace, writeTransport |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SexpList(SexpString type, Sexp[] expressions)
type
- the list type string.expressions
- the elements of the list.Method Detail |
public java.lang.String getType()
public int size()
public java.util.Iterator iterator()
public boolean isEmpty()
true
if this
list is empty
(i.e., only has a type), false
otherwise.
true
if this
list is empty
(i.e., only has a type), false
otherwise.public void writeCanonical(java.io.OutputStream out) throws java.io.IOException
Sexp
writeCanonical
in class Sexp
java.io.IOException
public void writeReadable(java.io.Writer out, int offset, int width, int last) throws java.io.IOException
Sexp
writeReadable
in class Sexp
offset
- spaces indented from left.width
- total width of window, in characters.last
- spaces reserved on right (e.g., for closing parens).
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |