Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ifs.example.tt
Class Dependence

    java.lang.Object
      ifs.model.Constraint
          ifs.model.BinaryConstraint
              ifs.example.tt.Dependence

    public class Dependence

extends BinaryConstraint

Binary dependence between two activities.

Version:
  1.0
Author:
  Tomáš Müller

Field Summary
`static int` | `TYPE_AFTER`
`static int` | `TYPE_BEFORE`
`static int` | `TYPE_CLOSELY_AFTER`
`static int` | `TYPE_CLOSELY_BEFORE`
`static int` | `TYPE_CONCURRENCY`
`static int` | `TYPE_NO_DEPENDENCE`

Constructor Summary
`Dependence(String id, int type)`

Method Summary
`void` | `computeConflicts(Value value, Set conflicts)` The only method which has to be implemented by any constraint.
`String` | `getName()` Constraint's name -- for printing purposes
`String` | `getResourceId()`
`int` | `getType()`
`boolean` | `inConflict(Value value)` Returns true if the given assignment is inconsistent with the existing assignments respecting this constraint.
`boolean` | `isConsistent(int s1, int l1, int s2, int l2)`
`boolean` | `isConsistent(Value value1, Value value2)` Returns true if the given assignments are consistent respecting this constraint.

Methods inherited from class ifs.model.BinaryConstraint
`addVariable, another, first, isFirst, second`

Methods inherited from class ifs.model.Constraint
`addConstraintListener, assigned, assignedVariables, countAssignedVariables, countVariables, getDescription, getId, getInfo, getModel, hashCode, isHard, removeConstraintListener, removeVariable, setModel, unassigned, variables`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TYPE_NO_DEPENDENCE

    public static final int TYPE_NO_DEPENDENCE

See Also:
  Constant Field Values

### TYPE_BEFORE

    public static final int TYPE_BEFORE

See Also:
  Constant Field Values

### TYPE_CLOSELY_BEFORE

    public static final int TYPE_CLOSELY_BEFORE

See Also:
  Constant Field Values

### TYPE_AFTER

    public static final int TYPE_AFTER

See Also:
  Constant Field Values

### TYPE_CLOSELY_AFTER

    public static final int TYPE_CLOSELY_AFTER

See Also:
  Constant Field Values

### TYPE_CONCURRENCY

    public static final int TYPE_CONCURRENCY

See Also:
  Constant Field Values

Constructor Detail

### Dependence

    public Dependence(String id,
                      int type)

Method Detail

### getType

    public int getType()

### getResourceId

    public String getResourceId()

### computeConflicts

    public void computeConflicts(Value value,
                                 Set conflicts)

  Description copied from class: `Constraint`
  The only method which has to be implemented by any constraint. It returns the values which needs to be unassigned in order to make this constraint consistent with the given value if it is assigned to its variable. The computed list of conflicting values is added to the given set of conflicts.

  Specified by:
    `computeConflicts` in class `Constraint`
  Parameters:
    `value` - value to be assigned to its varaible
    `conflicts` - resultant set of conflicting values

### isConsistent

    public boolean isConsistent(int s1,
                                int l1,
                                int s2,
                                int l2)

### inConflict

    public boolean inConflict(Value value)

  Description copied from class: `Constraint`
  Returns true if the given assignment is inconsistent with the existing assignments respecting this constraint. This method is used by MAC (see `MacPropagation`).

  Overrides:
    `inConflict` in class `Constraint`

### isConsistent

    public boolean isConsistent(Value value1,
                                Value value2)

  Description copied from class: `Constraint`
  Returns true if the given assignments are consistent respecting this constraint. This method is used by MAC (see `MacPropagation`).

  Overrides:
    `isConsistent` in class `Constraint`

### getName

    public String getName()

  Description copied from class: `Constraint`
  Constraint's name -- for printing purposes

  Overrides:
    `getName` in class `Constraint`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 Tomáš Müller