Search this API

y.util
Class DataAcceptorAdapter

java.lang.Object
  extended by y.util.DataAcceptorAdapter
All Implemented Interfaces:
DataAcceptor

public abstract class DataAcceptorAdapter
extends java.lang.Object
implements DataAcceptor

An abstract adapter class for accepting data. The data accepting methods in this class throw a UnsupportedOperationException and defined(Object) always returns false.

This class exists as a convenience for creating data acceptor objects.

Extend this class to access either typed or untyped data for a certain lookup domain.

 

Constructor Summary
DataAcceptorAdapter()
           
 
Method Summary
 boolean defined(java.lang.Object dataHolder)
          Returns false for all data holders.
 void set(java.lang.Object dataHolder, java.lang.Object value)
          Subclasses may override this method to set object values associated with a data holder.
 void setBool(java.lang.Object dataHolder, boolean value)
          Subclasses may override this method to set boolean values associated with a data holder.
 void setDouble(java.lang.Object dataHolder, double value)
          Subclasses may override this method to set double values associated with a data holder.
 void setInt(java.lang.Object dataHolder, int value)
          Subclasses may override this method to set integer values associated with a data holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataAcceptorAdapter

public DataAcceptorAdapter()
Method Detail

set

public void set(java.lang.Object dataHolder,
                java.lang.Object value)
Subclasses may override this method to set object values associated with a data holder.

Specified by:
set in interface DataAcceptor
Throws:
java.lang.UnsupportedOperationException - unless overwritten.

setInt

public void setInt(java.lang.Object dataHolder,
                   int value)
Subclasses may override this method to set integer values associated with a data holder.

Specified by:
setInt in interface DataAcceptor
Throws:
java.lang.UnsupportedOperationException - unless overwritten.

setDouble

public void setDouble(java.lang.Object dataHolder,
                      double value)
Subclasses may override this method to set double values associated with a data holder.

Specified by:
setDouble in interface DataAcceptor
Throws:
java.lang.UnsupportedOperationException - unless overwritten.

setBool

public void setBool(java.lang.Object dataHolder,
                    boolean value)
Subclasses may override this method to set boolean values associated with a data holder.

Specified by:
setBool in interface DataAcceptor
Throws:
java.lang.UnsupportedOperationException - unless overwritten.

defined

public boolean defined(java.lang.Object dataHolder)
Returns false for all data holders. Subclasses should override this method to make clear for which data holders there is a value accessible via this data provider.

Returns:
false.

© Copyright 2000-2018,
yWorks GmbH.
All rights reserved.