public class ParameterWriter extends FilterWriter
out
Constructor and Description |
---|
ParameterWriter()
Creates a new formatter writting parameters to the default output
stream.
|
ParameterWriter(Writer out)
Creates a new formatter writting parameters to the specified output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
format(OperationMethod operation)
Prints the elements of an operation to the output stream.
|
void |
format(ParameterDescriptorGroup descriptor)
Prints the elements of a descriptor group to the output stream.
|
void |
format(ParameterValueGroup values)
Prints the elements of a parameter group to the output stream.
|
protected String |
formatValue(Object value)
Format the specified value as a string.
|
Locale |
getLocale()
Returns the current locale.
|
static void |
print(OperationMethod operation)
Prints the elements of an operation to the default output stream.
|
static void |
print(ParameterDescriptorGroup descriptor)
Prints the elements of a descriptor group to the default output
stream.
|
static void |
print(ParameterValueGroup values)
Prints the elements of a parameter group to the default output
stream.
|
void |
setLocale(Locale locale)
Set the locale to use for table formatting.
|
void |
summary(Collection<? extends IdentifiedObject> parameters,
Set<String> scopes)
Formats a summary of a collection of identified objects.
|
public ParameterWriter()
public ParameterWriter(Writer out)
public static void print(OperationMethod operation)
new
ParameterWriter().format(operation)
.public static void print(ParameterDescriptorGroup descriptor)
new
ParameterWriter().format(descriptor)
.public static void print(ParameterValueGroup values)
new
ParameterWriter().format(values)
.public void format(OperationMethod operation) throws IOException
operation
- The operation method to format.IOException
- if an error occured will writing to the stream.public void format(ParameterDescriptorGroup descriptor) throws IOException
descriptor
- The descriptor group to format.IOException
- if an error occured will writing to the stream.public void format(ParameterValueGroup values) throws IOException
values
- The parameter group to format.IOException
- if an error occured will writing to the stream.public void summary(Collection<? extends IdentifiedObject> parameters, Set<String> scopes) throws IOException
parameters
- The collection of parameters to format.scopes
- The set of scopes to include in the table, of null
for all of them. A
restricted a set will produce a table with less columns.IOException
- if an error occured will writing to the stream.public Locale getLocale()
ParameterWriter
use the system default.public void setLocale(Locale locale)
protected String formatValue(Object value)
format(...)
methods. The default implementation format Number
, Date
and
Angle
object according the current locale. This method can
been overridden if more objects need to be formatted in a special way.value
- the value to format.Copyright © 1996–2019 Geotools. All rights reserved.