org.lsst.ccs.shell
Interface OutputConverter


public interface OutputConverter

This interface is used by the Shell to support new return types. It converts objects to other objects (usually strings) that will be displayed.

Author:
ASG

Method Summary
 Object convertOutput(Object toBeFormatted)
          Object-to--user-friendly-object (usually string) conversion method.
 

Method Detail

convertOutput

Object convertOutput(Object toBeFormatted)
Object-to--user-friendly-object (usually string) conversion method. The method must check argument's class, since it will be fed virtually all returned objects. Simply return null when not sure.

Parameters:
toBeFormatted - Object to be displayed to the user
Returns:
Object representing the object or Null if don't know how to make it. Do not return default toString() !!


Copyright © 2013 LSST. All Rights Reserved.