de.tuberlin.cs.cis.ocl.type.reflect
Interface OclString

All Superinterfaces:
OclAny
All Known Implementing Classes:
StringInstance

public interface OclString
extends OclAny

Represents and identifies the OCL 1.5 type String. It is used by the context checker to reflect operations of and to identify the type within the OCL-context. The names of the operations had to be adapted to java conform method names (therefore they must be remapped to the ocl names to be compareable). Each instance of this interface is handled as an OCL instance of the type String during the evaluation process. Its methods are used to describe the predefined properties of the type. For a complete description of the type and its properties (to be specific for this class and its methods) refer to the type description of OCL 1.5.

Author:
fchabar
See Also:
OCL 1.5 Standard, de.tuberlin.cs.cis.ocl.type, de.tuberlin.cs.cis.ocl.eval.instance

Method Summary
 OclString concat(OclString string2)
          Results in the concatenation of this instance and string2.
 OclInteger size()
          Results in the number of characters in string.
 OclString substring(OclInteger lower, OclInteger upper)
          Results in the sub-string of this instance starting at character number lower, up to and including character number upper.
 OclString toLower()
          Results in the value of this instance with all uppercase characters converted to lowercase characters.
 OclString toUpper()
          Results in the value of this instance with all lowercase characters converted to uppercase characters.
 
Methods inherited from interface de.tuberlin.cs.cis.ocl.type.reflect.OclAny
eq, neq, oclAsType, oclInState, oclIsKindOf, oclIsNew, oclIsTypeOf
 

Method Detail

size

public OclInteger size()
Results in the number of characters in string.

Returns:
the number of characters in string.

concat

public OclString concat(OclString string2)
Results in the concatenation of this instance and string2.

Parameters:
string2 - an instance of String (!= null)
Returns:
the concatenation of string and string2.

toUpper

public OclString toUpper()
Results in the value of this instance with all lowercase characters converted to uppercase characters.

Returns:
the value of this instance with all lowercase characters converted to uppercase characters.

toLower

public OclString toLower()
Results in the value of this instance with all uppercase characters converted to lowercase characters.

Returns:
the value of this instance with all uppercase characters converted to lowercase characters.

substring

public OclString substring(OclInteger lower,
                           OclInteger upper)
Results in the sub-string of this instance starting at character number lower, up to and including character number upper.

Parameters:
lower - the lower bound of the sub-string (!= null)
upper - the upper bound of the sub-string (!= null)
Returns:
the sub-string of this instance starting at character number lower, up to and including character number upper.