    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class jtelos.TelosInteger

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

public class TelosInteger
extends PrimitiveType

This is an object-oriented wrapper Java class that allows integer values to be Telos objects. It is somewhat like `java.lang.Integer`, but Java instances of `TelosInteger` are integer literals that are also contained in a Telos KB. That is not the case for a vanilla Java instance of `Integer`, or the `int` Java primitive type.

In a loose sense, integer literals that are Java instances of this Java class are also Telos "instances" of the integer type. This is represented by the individual returned by the `INTEGER_TYPE()` method in the interface `KB`. In Telos, this is written as `Integer` which is not to be confused with the Java class of the same name.

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, Integer, KB, kb

##

TelosInteger(int)
  Wraps the parameter.
TelosInteger(Integer)
  Wraps the parameter, converting it to an `int`.
TelosInteger(String)
  Wraps the parameter, converting it to an `int`.

##

equals(Object)
  Compares the `intValue()` of the objects, not the objects' oid's.
intValue()
  Returns the `int` value of the integer.
telosName()
  Returns the Java string representation of the integer.

##

TelosInteger

     public TelosInteger(int value)

  Wraps the parameter.

TelosInteger

     public TelosInteger(Integer value)

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

TelosInteger

     public TelosInteger(String string)

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

##

equals

     public boolean equals(Object obj)

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

  Overrides:
    equals in class Object

intValue

     public int intValue()

  Returns the `int` value of the integer.

telosName

     public String telosName()

  Returns the Java string representation of the integer.

  Overrides:
    telosName in class PrimitiveType

    All Packages  Class Hierarchy  This Package  Previous  Next  Index