net.ontopia.utils
Class GrabberStringifier<T,G>

java.lang.Object
  extended by net.ontopia.utils.GrabberStringifier<T,G>
All Implemented Interfaces:
StringifierIF<T>

public class GrabberStringifier<T,G>
extends Object
implements StringifierIF<T>

INTERNAL: Stringifies the object that the grabber grabs. DefaultStringifier will be used if no nested stringifier is specified.


Field Summary
protected  GrabberIF<T,G> grabber
           
protected  StringifierIF<? super G> stringifier
           
 
Constructor Summary
GrabberStringifier(GrabberIF<T,G> grabber)
           
GrabberStringifier(GrabberIF<T,G> grabber, StringifierIF<? super G> stringifier)
           
 
Method Summary
 void setGrabber(GrabberIF<T,G> grabber)
          Set the grabber which is to be used.
 void setStringifier(StringifierIF<? super G> stringifier)
          Set the stringifier which is to be used.
 String toString(T object)
          Returns a stringified version of the object, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grabber

protected GrabberIF<T,G> grabber

stringifier

protected StringifierIF<? super G> stringifier
Constructor Detail

GrabberStringifier

public GrabberStringifier(GrabberIF<T,G> grabber)

GrabberStringifier

public GrabberStringifier(GrabberIF<T,G> grabber,
                          StringifierIF<? super G> stringifier)
Method Detail

setGrabber

public void setGrabber(GrabberIF<T,G> grabber)
Set the grabber which is to be used.


setStringifier

public void setStringifier(StringifierIF<? super G> stringifier)
Set the stringifier which is to be used.


toString

public String toString(T object)
Description copied from interface: StringifierIF
Returns a stringified version of the object, i.e. a string representation of that object.

Specified by:
toString in interface StringifierIF<T>
Parameters:
object - the object that is to be made a string representation of.
Returns:
a string representation of the object argument.


Copyright © 2000-2012 Ontopia.