Package ru.ispras.fortress.solver
Class SolverOperation
- java.lang.Object
-
- ru.ispras.fortress.solver.SolverOperation
-
public abstract class SolverOperation extends java.lang.Object
TheSolverOperation
class stores information about a solver operation. The information explains how the operation should be translated to solver-specific representation. TheSolverOperation
class describes both built-in and custom solver operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SolverOperation.Kind
Describes the type of the solver operation.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Function
getFunction()
Returns the underlying function.SolverOperation.Kind
getKind()
Returns operation kind identifier.java.lang.Enum<?>
getOperationId()
Returns the operation identifier.abstract FunctionTemplate
getTemplate()
Returns the underlying function template.abstract java.lang.String
getText()
Returns the textual representation of the operation.static SolverOperation
newFunction(Function function)
Constructs a solver operation on the basis of the given function.static SolverOperation
newTemplate(FunctionTemplate template)
Constructs a solver operation on the basis of the given function template.static SolverOperation
newText(java.lang.Enum<?> id, java.lang.String text)
Constructs a solver operation from the specified operation identifier and the textual representation of the operation.
-
-
-
Method Detail
-
newText
public static final SolverOperation newText(java.lang.Enum<?> id, java.lang.String text)
Constructs a solver operation from the specified operation identifier and the textual representation of the operation.- Parameters:
id
- Operation identifier.text
- Textual representation of the operation.- Returns:
SolverOperation
object.- Throws:
java.lang.IllegalArgumentException
- if any of the arguments isnull
.
-
newFunction
public static final SolverOperation newFunction(Function function)
Constructs a solver operation on the basis of the given function.- Parameters:
function
- Function object.- Returns:
SolverOperation
object.- Throws:
java.lang.IllegalArgumentException
- if the argument isnull
.
-
newTemplate
public static final SolverOperation newTemplate(FunctionTemplate template)
Constructs a solver operation on the basis of the given function template.- Parameters:
template
- Function template object.- Returns:
SolverOperation
object.- Throws:
java.lang.IllegalArgumentException
- if the argument isnull
.
-
getKind
public final SolverOperation.Kind getKind()
Returns operation kind identifier.- Returns:
- Operation kind identifier.
-
getOperationId
public final java.lang.Enum<?> getOperationId()
Returns the operation identifier.- Returns:
- Operation identifier.
-
getText
public abstract java.lang.String getText()
Returns the textual representation of the operation.- Returns:
- Textual representation of the operation.
-
getFunction
public abstract Function getFunction()
Returns the underlying function.- Returns:
- Underlying function.
-
getTemplate
public abstract FunctionTemplate getTemplate()
Returns the underlying function template.- Returns:
- Underlying function template.
-
-