org.omegahat.Environment.IO
Class TruncatedObjectDisplay
java.lang.Object
|
+--org.omegahat.Environment.IO.BasicObjectDisplay
|
+--org.omegahat.Environment.IO.TruncatedObjectDisplay
- All Implemented Interfaces:
- ObjectDisplayFilter
- Direct Known Subclasses:
- BasicTaskDisplay
- public class TruncatedObjectDisplay
- extends BasicObjectDisplay
Output display filter that shows only the beginning and the end
of several types of container objects, such as arrays, hashtables,
vectors, etc so as not to clutter the work window and print
large quantities of unintended output.
This is especially important if we cannot trap signals to input the displaying
of the output.
|
Field Summary |
protected int |
above
|
protected int |
below
|
|
Method Summary |
int |
above()
|
int |
above(int val)
|
int |
below()
|
int |
below(int val)
|
boolean |
defaultDisplay(java.lang.Object obj)
Default display method which simply
prints the object to the output stream
(without a newline). |
boolean |
display(java.lang.Class c)
|
boolean |
display(java.util.Enumeration e)
Display the contents of an Enumeration
just as we show the contents of an array
displayArray(Object),
separating each element with the
OutputElementSeparator. |
boolean |
display(java.util.Hashtable table)
|
boolean |
display(java.lang.Object obj,
int below)
|
boolean |
display(java.lang.Object obj,
int below,
int above)
|
boolean |
display(java.util.Vector v)
Display the contents of the given Vector. |
boolean |
displayArray(java.lang.Object obj)
Display an array object, writing each element to the output
stream, separating each from the previous value
by the separator OutputElementSeparator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
below
protected int below
above
protected int above
TruncatedObjectDisplay
public TruncatedObjectDisplay()
TruncatedObjectDisplay
public TruncatedObjectDisplay(java.io.PrintWriter out)
TruncatedObjectDisplay
public TruncatedObjectDisplay(java.io.PrintWriter out,
int low,
int high)
displayArray
public boolean displayArray(java.lang.Object obj)
- Description copied from class:
BasicObjectDisplay
- Display an array object, writing each element to the output
stream, separating each from the previous value
by the separator
OutputElementSeparator.
- Overrides:
displayArray in class BasicObjectDisplay
display
public boolean display(java.util.Enumeration e)
- Description copied from class:
BasicObjectDisplay
- Display the contents of an
Enumeration
just as we show the contents of an array
displayArray(Object),
separating each element with the
OutputElementSeparator.
separator.
- Overrides:
display in class BasicObjectDisplay
display
public boolean display(java.lang.Class c)
display
public boolean display(java.util.Vector v)
- Display the contents of the given
Vector.
display
public boolean display(java.util.Hashtable table)
below
public int below()
below
public int below(int val)
above
public int above()
above
public int above(int val)
display
public boolean display(java.lang.Object obj,
int below)
display
public boolean display(java.lang.Object obj,
int below,
int above)
defaultDisplay
public boolean defaultDisplay(java.lang.Object obj)
- Description copied from class:
BasicObjectDisplay
- Default display method which simply
prints the object to the output stream
(without a newline).
- Overrides:
defaultDisplay in class BasicObjectDisplay