|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.referencing.wkt.Element
An element in a Well Know Text (WKT). A is
made of String
, Number
and other Element
. For example:
Each object can contains an arbitrary amount of other elements. The result is a tree, which can be printed withPRIMEM["Greenwich", 0.0, AUTHORITY["some authority", "Greenwich"]]
print(java.io.PrintWriter, int)
.
Elements can be pull in a first in, first out order.
Field Summary | |
java.lang.String |
keyword
Keyword of this entity. |
Method Summary | |
void |
close()
Close this element. |
java.text.ParseException |
parseFailed(java.lang.Exception cause,
java.lang.String message)
Returns a ParseException with the specified cause. |
java.lang.Object |
peek()
Returns the next element, or if there is no more element. |
void |
print(java.io.PrintWriter out,
int level)
Print this as a tree. |
double |
pullDouble(java.lang.String key)
Removes the next Number from the list and returns it. |
Element |
pullElement(java.lang.String key)
Removes the next Element from the list and returns it. |
int |
pullInteger(java.lang.String key)
Removes the next Number from the list and returns it
as an integer. |
Element |
pullOptionalElement(java.lang.String key)
Removes the next Element from the list and returns it. |
java.lang.String |
pullString(java.lang.String key)
Removes the next String from the list and returns it. |
Element |
pullVoidElement(java.lang.String key)
Removes and returns the next Element with no bracket.
|
java.lang.String |
toString()
Returns the keyword. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final java.lang.String keyword
Method Detail |
public java.text.ParseException parseFailed(java.lang.Exception cause, java.lang.String message)
ParseException
with the specified cause. A localized string
"Error in <keyword
>"
will be prepend to the message.
The error index will be the starting index of this .
cause
- The cause of the failure, or if none.message
- The message explaining the cause of the failure, or
for reusing the same message than .
public double pullDouble(java.lang.String key) throws java.text.ParseException
Number
from the list and returns it.
key
- The parameter name. Used for formatting
an error message if no number are found.
Number
on the list as a .
java.text.ParseException
- if no more number is available.public int pullInteger(java.lang.String key) throws java.text.ParseException
Number
from the list and returns it
as an integer.
key
- The parameter name. Used for formatting
an error message if no number are found.
Number
on the list as an .
java.text.ParseException
- if no more number is available, or the number
is not an integer.public java.lang.String pullString(java.lang.String key) throws java.text.ParseException
String
from the list and returns it.
key
- The parameter name. Used for formatting
an error message if no number are found.
String
on the list.
java.text.ParseException
- if no more string is available.public Element pullElement(java.lang.String key) throws java.text.ParseException
Element
from the list and returns it.
key
- The element name (e.g. "PRIMEM"
).
Element
on the list.
java.text.ParseException
- if no more element is available.public Element pullOptionalElement(java.lang.String key)
Element
from the list and returns it.
key
- The element name (e.g. "PRIMEM"
).
Element
on the list,
or if no more element is available.public Element pullVoidElement(java.lang.String key) throws java.text.ParseException
Element
with no bracket.
The key is used only for only for formatting an error message.
key
- The parameter name. Used only for formatting an error message.
Element
in the list, with no bracket.
java.text.ParseException
- if no more void element is available.public java.lang.Object peek()
public void close() throws java.text.ParseException
java.text.ParseException
- If the list still contains some unprocessed elements.public java.lang.String toString()
close()
.
public void print(java.io.PrintWriter out, int level)
out
- The output stream.level
- The indentation level (usually 0).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |