org.simantics.databoard.adapter
Class DefaultAdapter

java.lang.Object
  extended by org.simantics.databoard.adapter.DefaultAdapter
All Implemented Interfaces:
Adapter

Deprecated. Use AdapterRepository instead (more efficient)

public class DefaultAdapter
extends java.lang.Object
implements Adapter

DefaultAdapter adapts anything to anything.


Method Summary
 java.lang.Object adapt(java.lang.Object obj)
          Deprecated. Adapt instance of one binding to format of another binding.
static java.lang.Object adapt(java.lang.Object src, Binding domain, Binding range)
          Deprecated. Adapt instance of one binding to format of another binding.
 java.lang.Object adaptUnchecked(java.lang.Object obj)
          Deprecated. Adapt instance of one binding to format of another binding.
 boolean equals(java.lang.Object obj)
          Deprecated.  
 Binding getDomain()
          Deprecated.  
 Binding getRange()
          Deprecated.  
 int hashCode()
          Deprecated.  
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

adapt

public static java.lang.Object adapt(java.lang.Object src,
                                     Binding domain,
                                     Binding range)
                              throws AdaptException
Deprecated. 
Adapt instance of one binding to format of another binding. The datatype of the two bindings must be structurally equal.

Parameters:
src - source instance
Returns:
result
Throws:
AdaptException

adapt

public java.lang.Object adapt(java.lang.Object obj)
                       throws AdaptException
Deprecated. 
Adapt instance of one binding to format of another binding. The datatype of the two bindings must be structurally equal.

Specified by:
adapt in interface Adapter
Parameters:
obj - source instance
Returns:
result
Throws:
AdaptException

adaptUnchecked

public java.lang.Object adaptUnchecked(java.lang.Object obj)
                                throws RuntimeAdaptException
Deprecated. 
Description copied from interface: Adapter
Adapt instance of one binding to format of another binding. Note! adapt may recycle the argument (use it in the result). This dependes on the implementation. Cloning adapter recycles only immutable instances.

Specified by:
adaptUnchecked in interface Adapter
Parameters:
obj - source instance
Returns:
result
Throws:
RuntimeAdaptException

getDomain

public Binding getDomain()
Deprecated. 

getRange

public Binding getRange()
Deprecated. 

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Deprecated. 
Overrides:
equals in class java.lang.Object