|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.type.types.Numeric
public abstract class Numeric
Definition of the Numeric type.
Constructor Summary | |
---|---|
protected |
Numeric()
|
Method Summary | |
---|---|
abstract int |
compareTo(Numeric other)
|
boolean |
equals(Object other)
Compare the specified object with this type for equality. |
abstract boolean |
getBit()
Get the value of this Numeric. |
Bounds |
getBounds()
|
abstract Numeric |
getClone()
Create a cloned copy of the current object and return it. |
abstract int |
getInt()
Get the value of this Numeric. |
abstract double |
getReal()
Get the value of this Numeric. |
abstract String |
getRepresentation()
|
int |
hashCode()
Returns the hash code value for this list. |
abstract void |
set(boolean value)
Set the value of the Numeric. |
abstract void |
set(double value)
Set the value of the Numeric. |
abstract void |
set(int value)
Set the value of the Numeric. |
abstract void |
set(String value)
Set the value of the Numeric. |
abstract void |
setBit(boolean value)
Set the bit value with the provided value. |
abstract void |
setBit(String value)
Set the bit value with the provided value. |
void |
setBounds(Bounds bounds)
|
void |
setBounds(double lower,
double upper)
|
abstract void |
setInt(int value)
Set the integer value with the provided value. |
abstract void |
setInt(String value)
Set the integer value with the provided value. |
abstract void |
setReal(double value)
Set the real value with the provided value. |
abstract void |
setReal(String value)
Set the real value with the provided value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.cilib.type.types.Resetable |
---|
reset |
Methods inherited from interface net.sourceforge.cilib.type.types.Randomizable |
---|
randomize |
Constructor Detail |
---|
protected Numeric()
Method Detail |
---|
public abstract Numeric getClone()
getClone
in interface Type
getClone
in interface Cloneable
Object.clone()
public boolean equals(Object other)
true
if and only if the specified object is also an instance
of the same type.
equals
in interface Type
equals
in class Object
other
- The object to compare.
true
if equality exists, false
otherwise.Object.equals(Object)
public int hashCode()
int hashCode = 7; Iterator<E> i = list.iterator(); while (i.hasNext()) { E obj = i.next(); hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); }This ensures that type1.equals(type2) implies that type1.hashCode()==type2.hashCode() for any two types, type1 and type2, as required by the general contract of
Object.hashCode()
.
hashCode
in interface Type
hashCode
in class Object
Object.equals(Object)
,
Type.equals(Object)
public abstract void set(String value)
value
- The String value to be parsed.public abstract void set(boolean value)
value
- The boolean value representing the value for this Type.public abstract void set(int value)
value
- The int value representing the value for this Type.public abstract void set(double value)
value
- The double value representing the value for this Type.public abstract boolean getBit()
public abstract void setBit(boolean value)
value
- The value to set.public abstract void setBit(String value)
value
- The value to set.public abstract int getInt()
public abstract void setInt(int value)
value
- The value to set.public abstract void setInt(String value)
value
- The value to set.public abstract double getReal()
public abstract void setReal(double value)
value
- The value to set.public abstract void setReal(String value)
value
- The value to set.public abstract int compareTo(Numeric other)
compareTo
in interface Comparable<Numeric>
public Bounds getBounds()
getBounds
in interface BoundedType
public void setBounds(Bounds bounds)
setBounds
in interface BoundedType
public void setBounds(double lower, double upper)
setBounds
in interface BoundedType
public abstract String getRepresentation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |