jsky.catalog
Class FieldFormat
java.lang.Object
jsky.catalog.FieldFormat
public class FieldFormat
- extends Object
This utility class provides a method to scan specially formatted
values from a string and return an object of the correct type.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldFormat
public FieldFormat()
getValue
public static Object getValue(FieldDesc fieldDesc,
String s)
- Return an object for the given field description by parsing the given string.
- Parameters:
fieldDesc
- describes the fields
- the value in string format
- Returns:
- an object of the given class, or null if it could not be parsed
getValueRange
public static ValueRange getValueRange(FieldDesc fieldDesc,
String s)
- Return a ValueRange object representing a range of values for the given
field by parsing the given string.
- Parameters:
fieldDesc
- describes the fields
- the value range in string format, which may be encoded as two
values: "min max", as one value: "value" (For numerical types,
tests for equality, for Strings, the start of the string). The
symbols ">", or "<" may be used in the string for numerical types,
to indicate that the value should be greater than or less than
the (noninclusive) given values, for example: ">0.0 <1.0".
If there are two values, they should be separated by a single space
and the first value should be the minimum value (inclusive,
unless ">" was specified).
- Returns:
- a ValueRange object representing the range of values, or null if they
could not be parsed
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.