public class FInterval extends Object implements IInterval
Modifier and Type | Class and Description |
---|---|
static class |
FInterval.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
static String |
FINTERVAL_PERSISTENCE_DEFINITION_NAME |
Constructor and Description |
---|
FInterval()
Creates a new empty FInterval, used to be instantiated by persistence
|
FInterval(double from,
double to)
Crea un nuevo FInterval.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of the object.
|
double |
getMax()
Devuelve el número final.
|
double |
getMin()
Devuelve el número de origen.
|
boolean |
isInInterval(Object v)
Returns if the given value is included into the interval.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
String |
toString() |
public static final String FINTERVAL_PERSISTENCE_DEFINITION_NAME
public FInterval()
public FInterval(double from, double to)
from
- Origen.to
- Destino.public boolean isInInterval(Object v)
IInterval
isInInterval
in interface IInterval
v
- value to check. Must be instance of Number
public double getMin()
public double getMax()
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException