    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class jtelos.TelosString

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

public class TelosString
extends PrimitiveType

This is a wrapper Java class that allows String values to be telos objects. It is somewhat like `java.lang.String`, but Java instances of `TelosString` are string literals that are also contained in a Telos KB. That is not the case for a vanilla Java instance of `String`.

In a loose sense, string literals that are Java instances of this Java class are also Telos "instances" of the string type. This is represented by the individual returned by the `STRING_TYPE()` in the interface `KB`. In Telos, this is written as `String` 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:
  TelosInteger, String, KB, kb

##

TelosString(String)
  Wraps the parameter.

##

equals(Object)
  Compares the `stringValue()` of the objects, not the objects' oid's.
stringValue()
  Returns the value of this string, without quotation marks.
telosName()
  Returns the value of this string, in quotation marks.

##

TelosString

     public TelosString(String value)

  Wraps the parameter.

##

equals

     public boolean equals(Object obj)

  Compares the `stringValue()` of the objects, not the objects' oid's. It is similar to the Java class `String`'s `equals(Object)` method.

  Overrides:
    equals in class Object

stringValue

     public String stringValue()

  Returns the value of this string, without quotation marks.

  For instance, if the constructor invocation for this object was `new TelosString("Hello world!")`. This method would return a Java string `Hello world!`. `telosNAme()` returns the same string, with quotation marks.

  See Also:
    stringValue

telosName

     public String telosName()

  Returns the value of this string, in quotation marks.

  For instance, if the constructor invocation for this object was `new TelosString("Hello world!")`. This method would return a Java string `"Hello world!"` including the quotation marks in the string. `stringValue()` returns the same string, but without the quotation marks.

  Overrides:
    telosName in class PrimitiveType
  See Also:
    stringValue

    All Packages  Class Hierarchy  This Package  Previous  Next  Index