org.omegahat.Environment.IO
Class BasicTaskDisplay

java.lang.Object
  |
  +--org.omegahat.Environment.IO.BasicObjectDisplay
        |
        +--org.omegahat.Environment.IO.TruncatedObjectDisplay
              |
              +--org.omegahat.Environment.IO.BasicTaskDisplay
All Implemented Interfaces:
ObjectDisplayFilter, TaskDisplayFilter
Direct Known Subclasses:
TypeTaskDisplay

public class BasicTaskDisplay
extends TruncatedObjectDisplay
implements TaskDisplayFilter

A class used as the default mechanism for displaying the result of evaluating top-level tasks on the user's terminal. This displays objects by truncating the large objects, providing the beginning and the end values.


Fields inherited from class org.omegahat.Environment.IO.TruncatedObjectDisplay
above, below
 
Fields inherited from class org.omegahat.Environment.IO.BasicObjectDisplay
OutputElementSeparator, stdout
 
Constructor Summary
BasicTaskDisplay()
           
BasicTaskDisplay(java.io.PrintWriter out)
           
BasicTaskDisplay(java.io.PrintWriter out, int low, int high)
          Create a task display object associated with the given output stream and controlling the number of values displayed at the beginning and end of large objects which are truncated.
 
Method Summary
 boolean display(Task task)
          Display the result of the specified task by printing the last value of the result.
 java.lang.Object taskObject(Task task)
          Get the object that we will display from the task object.
 
Methods inherited from class org.omegahat.Environment.IO.TruncatedObjectDisplay
above, above, below, below, defaultDisplay, display, display, display, display, display, display, displayArray
 
Methods inherited from class org.omegahat.Environment.IO.BasicObjectDisplay
defaultDisplay, display, display, stdout, stdout, toString, toWriter, writer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omegahat.Environment.IO.ObjectDisplayFilter
display, display, toString, toWriter, writer
 

Constructor Detail

BasicTaskDisplay

public BasicTaskDisplay()

BasicTaskDisplay

public BasicTaskDisplay(java.io.PrintWriter out)
Parameters:
out - The output "device" to which the contents of the objects should be displayed. This can be a file, socket, etc.

BasicTaskDisplay

public BasicTaskDisplay(java.io.PrintWriter out,
                        int low,
                        int high)
Create a task display object associated with the given output stream and controlling the number of values displayed at the beginning and end of large objects which are truncated.
Parameters:
out - the output device to which displays are written.
low - passed to TruncatedObjectDisplay controlling how many elements to show at the beginning of the object.
high - passed to TruncatedObjectDisplay controlling how many objects to show at the end of the object.
Method Detail

display

public boolean display(Task task)
Display the result of the specified task by printing the last value of the result.
Specified by:
display in interface TaskDisplayFilter

taskObject

public java.lang.Object taskObject(Task task)
Get the object that we will display from the task object.