public final class MultiplexFormatter extends Object implements DiffXFormatter
Constructor and Description |
---|
MultiplexFormatter()
Creates a new formatter without any underlying formatters.
|
MultiplexFormatter(DiffXFormatter f)
Creates a new formatter wrapping the specified formatter.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DiffXFormatter f)
Adds a formatter to multiplex.
|
void |
delete(DiffXEvent e)
Formats the specified deleted event.
|
void |
format(DiffXEvent e)
Formats the specified event.
|
void |
insert(DiffXEvent e)
Formats the specified inserted event.
|
void |
setConfig(DiffXConfig config)
Sets the configuration to use with this formatter.
|
public MultiplexFormatter()
public MultiplexFormatter(DiffXFormatter f)
f
- The formatter to use.public void add(DiffXFormatter f)
f
- The Diff-X formatter to add.public void format(DiffXEvent e) throws IOException
DiffXFormatter
format
in interface DiffXFormatter
e
- The event to formatIOException
- Should an I/O exception occurs while formatting.public void insert(DiffXEvent e) throws IOException
DiffXFormatter
insert
in interface DiffXFormatter
e
- The event to formatIOException
- Should an I/O exception occurs while formatting.public void delete(DiffXEvent e) throws IOException, IllegalStateException
DiffXFormatter
delete
in interface DiffXFormatter
e
- The event to formatIOException
- Should an I/O exception occurs while formatting.IllegalStateException
- If the formatter is not in a state to run this method.public void setConfig(DiffXConfig config)
DiffXFormatter
setConfig
in interface DiffXFormatter
config
- The configuration to use.Copyright © 2007-2019. All Rights Reserved.