org.eclipse.ocl.examples.library.string
Class StringToRealOperation

java.lang.Object
  extended by org.eclipse.ocl.examples.library.AbstractFeature
      extended by org.eclipse.ocl.examples.library.AbstractOperation
          extended by org.eclipse.ocl.examples.library.AbstractUnaryOperation
              extended by org.eclipse.ocl.examples.library.string.StringToRealOperation
All Implemented Interfaces:
LibraryFeature, LibraryOperation, LibraryUnaryOperation, CallableImplementation

public class StringToRealOperation
extends AbstractUnaryOperation

StringToRealOperation realises the String::toReal() library operation.

Since:
3.1

Field Summary
static StringToRealOperation INSTANCE
           
 
Constructor Summary
StringToRealOperation()
           
 
Method Summary
 Value evaluate(ValueFactory valueFactory, Value sourceVal)
          Return the result of evaluating the operation on an argument.
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractUnaryOperation
evaluate
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractOperation
evaluate, evaluateArgument, getNumArguments
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractFeature
validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.evaluation.CallableImplementation
evaluate, validate
 

Field Detail

INSTANCE

public static final StringToRealOperation INSTANCE
Constructor Detail

StringToRealOperation

public StringToRealOperation()
Method Detail

evaluate

public Value evaluate(ValueFactory valueFactory,
                      Value sourceVal)
               throws InvalidValueException
Description copied from interface: LibraryUnaryOperation
Return the result of evaluating the operation on an argument. An invalid return may be indicated by throwing an exception returning Java null or OCL invalid.

sourceVal - the argument
Returns:
the evaluated value
Throws:
InvalidValueException