com.taco.swinger.text2gui
Class CollectionToTreePathMapper

java.lang.Object
  extended by com.taco.swinger.text2gui.CollectionToTreePathMapper
All Implemented Interfaces:
IObjectMapper

public final class CollectionToTreePathMapper
extends java.lang.Object
implements IObjectMapper

Converts a collection or array into a TreePath containing the elements.


Field Summary
static CollectionToTreePathMapper instance
          The singleton instance of this class.
 
Method Summary
static void main(java.lang.String[] args)
          Make a TreePath out of the arguments and print it out.
 java.lang.Object map(java.lang.Object obj)
          Create a new TreePath using either an instance of Object[] or Collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final CollectionToTreePathMapper instance
The singleton instance of this class.

Method Detail

map

public java.lang.Object map(java.lang.Object obj)
Create a new TreePath using either an instance of Object[] or Collection.

Specified by:
map in interface IObjectMapper
Parameters:
obj - An object array or a Collection containing the elements in the path.
Returns:
A new instance of TreePath.
Throws:
java.lang.NullPointerException - if obj is null.

main

public static void main(java.lang.String[] args)
Make a TreePath out of the arguments and print it out.