DESY ACOP Beans Home
com.cosylab.gui.adapters
Class LogarithmicConverter
java.lang.Object
com.cosylab.gui.displayers.DataSourceSupport
com.cosylab.gui.adapters.DataConsumerDispatcher
com.cosylab.gui.adapters.AbstractConverter
com.cosylab.gui.adapters.SimpleConverterSupport
com.cosylab.gui.adapters.LogarithmicConverter
- All Implemented Interfaces:
- Converter, DataConsumer, DataSource, DoubleConsumer, DoubleSeqConsumer, java.io.Serializable, java.lang.Cloneable
public class LogarithmicConverter
- extends SimpleConverterSupport
- implements DoubleConsumer
LogarithmicConverter
logarithms the supplied value using the
logarithm of the specified base. If the incomming value is x, the transformed
ont is log_base(x).
- Version:
- $Id: LogarithmicConverter.java,v 1.13 2008-04-22 12:31:02 jbobnar Exp $
- Author:
- Jaka Bobnar
- See Also:
- Serialized Form
Constructor Summary |
LogarithmicConverter()
Constructs a new LogarithmicConverter with base e = 2.7182... |
LogarithmicConverter(double base)
Constructs a new LogarithmicConverter with the given base factor. |
Method Summary |
boolean |
equals(java.lang.Object obj)
|
double |
getBase()
Returns the base of the logarithm. |
protected double |
getLogBase()
|
java.lang.String |
getName()
Returns name of this data consumer. |
protected double |
inverseTransform(double value)
User must implement this method to make inverse transformation as in
transfirm(double) function. |
void |
setBase(double base)
Sets the base of the logarithm. |
void |
setCharacteristics(java.util.Map characteristics)
This is called by peer data source. |
protected void |
setLogBase(double logBase)
|
java.lang.String |
toString()
|
protected double |
transform(double value)
User must implement this method and from prvided parameter calculate
with own transfromatin function new value and return it. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.cosylab.gui.adapters.Converter |
clone |
SHORT_NAME
public static final java.lang.String SHORT_NAME
- See Also:
- Constant Field Values
LogarithmicConverter
public LogarithmicConverter()
- Constructs a new LogarithmicConverter with base e = 2.7182...
- See Also:
Math.E
LogarithmicConverter
public LogarithmicConverter(double base)
- Constructs a new LogarithmicConverter with the given base factor.
- Parameters:
base
-
inverseTransform
protected double inverseTransform(double value)
- Description copied from class:
SimpleConverterSupport
- User must implement this method to make inverse transformation as in
transfirm(double)
function. Following must be true
some_value == inverseTransform(transfirm(some_value))
.
- Specified by:
inverseTransform
in class SimpleConverterSupport
- Parameters:
value
- the value to be transfirmed with inverse function
- Returns:
- the inversed value
- See Also:
SimpleConverterSupport.transform(double)
transform
protected double transform(double value)
- Description copied from class:
SimpleConverterSupport
- User must implement this method and from prvided parameter calculate
with own transfromatin function new value and return it.
- Specified by:
transform
in class SimpleConverterSupport
- Parameters:
value
- the value to be transfirmed
- Returns:
- the transformed value
getBase
public double getBase()
- Returns the base of the logarithm.
- Returns:
setBase
public void setBase(double base)
- Sets the base of the logarithm.
- Parameters:
base
-
getLogBase
protected double getLogBase()
setLogBase
protected void setLogBase(double logBase)
getName
public java.lang.String getName()
- Description copied from interface:
DataConsumer
- Returns name of this data consumer.
- Specified by:
getName
in interface DataConsumer
- Overrides:
getName
in class DataConsumerDispatcher
- Returns:
- the name of this data consumer
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
setCharacteristics
public void setCharacteristics(java.util.Map characteristics)
- Description copied from class:
AbstractConverter
- This is called by peer data source. Call is delegated to contained
consumers. In the process it is modified with transformation function.
- Specified by:
setCharacteristics
in interface DataConsumer
- Overrides:
setCharacteristics
in class AbstractConverter
- Parameters:
characteristics
- the Map
with attri- See Also:
DataConsumer.setCharacteristics(java.util.Map)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
Copyright © 2010. All Rights Reserved.