org.robokind.api.common.utils
Class PolymorphicAdapter<A,B>
java.lang.Object
org.robokind.api.common.utils.PolymorphicAdapter<A,B>
- All Implemented Interfaces:
- Adapter<A,B>
public class PolymorphicAdapter<A,B>
- extends Object
- implements Adapter<A,B>
- Author:
- Matthew Stevenson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolymorphicAdapter
public PolymorphicAdapter(PolymorphicAdapter.AdapterKeyMap<A> keyMap)
addAdapter
public void addAdapter(String adaptClass,
Adapter<A,B> adapter)
adapt
public B adapt(A a)
- Description copied from interface:
Adapter
- Adapts the given instance.
- Specified by:
adapt in interface Adapter<A,B>
- Parameters:
a - instance to adapt
- Returns:
- an instance of B from the given instance of A.
Copyright © 2011-2012. All Rights Reserved.