    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class jtelos.TelosReal

    java.lang.Object
       |
       +----jtelos.PrimitiveType
               |
               +----jtelos.TelosReal

public class TelosReal
extends PrimitiveType

This is an object-oriented wrapper Java class that allows floating point values to be Telos `TelosReal` objects. It is somewhat like `java.lang.Float`, but Java instances of `TelosReal` are real (floating point) literals that are also contained in a Telos KB. That is not the case for a vanilla Java instance of `Float`, or the `float` Java primitive type.

In a loose sense, real literals that are Java instances of this Java class are also Telos "instances" of the "real" type. This is represented by the individual returned by `REAL_TYPE()` in the interface `KB`. In Telos this is written as `TelosReal` (not to be confused with this Java class!).

The only abstract method that needs to be implemented is `kb()` since these depend directly on the implementation of the `KB` Java interface.

See Also:
  TelosString, TelosInteger, Float, KB, kb

##

TelosReal(Float)
  Wraps the parameter, converting it to an `float`.
TelosReal(float)
  Wraps the parameter.
TelosReal(String)
  Wraps the parameter, converting it to an `float`.

##

equals(Object)
  Compares the `floatValue()` of the objects, not the objects' oid's.
floatValue()
  Returns the `float` value of the real.
telosName()
  Returns the Java string representation of the real.

##

TelosReal

     public TelosReal(float value)

  Wraps the parameter.

TelosReal

     public TelosReal(Float value)

  Wraps the parameter, converting it to an `float`.

TelosReal

     public TelosReal(String string)

  Wraps the parameter, converting it to an `float`.

##

equals

     public boolean equals(Object obj)

  Compares the `floatValue()` of the objects, not the objects' oid's.

  Overrides:
    equals in class Object

floatValue

     public float floatValue()

  Returns the `float` value of the real.

telosName

     public String telosName()

  Returns the Java string representation of the real.

  Overrides:
    telosName in class PrimitiveType

    All Packages  Class Hierarchy  This Package  Previous  Next  Index