public class ValueParser extends Object
X? which contain a line of key-value pairs where the key is
one or more space-separated alphanumeric words and the values are decimal numbers compatible with
Java doubles. A key and its value are separated by an equals sign or a colon. A value may be followed
by one of the unit specifiers "mm", "deg", "A" or "u" with or without separating whitespace. The units
are checked but discarded.
Example input: X=1.5e-1, Y=0.0mm, U=0.0, B: 0.0 deg, P=0.0deg, foo bar =22.5
In the last pair the key treated as "foo bar"; leading and trailing whitespace is pruned while
whitespace between words is reduced to s single space.
The result of a successful parse is a Map<String, Double>.
| Modifier and Type | Class and Description |
|---|---|
static class |
ValueParser.ParseError
Represents a parsing error.
|
| Constructor and Description |
|---|
ValueParser() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] arg) |
static Map<String,Double> |
parse(String tbReply) |
public static Map<String,Double> parse(String tbReply)
tbReply - A reply from the TB Server, cut down to a single line containing key-value pairs as
described in the class Javadoc.ValueParser.ParseError - if the line can't be parsed.public static void main(String[] arg)
Copyright © 2023 LSST. All rights reserved.