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.extension
Class AssignmentSet

    java.lang.Object
      ifs.extension.AssignmentSet

    public class AssignmentSet

extends Object

This class describing a set of assignment (used by CBS). It also contains a counter, name, description and a constraint (for printing purposes).

Version:
  1.0
Author:
  Tomáš Müller

Constructor Summary
`AssignmentSet()`
`AssignmentSet(Assignment[] assignments)`
`AssignmentSet(Collection assignments)`

Method Summary
`void` | `addAssignment(Assignment assignment)` Adds an assignment
`void` | `addAssignment(long iteration, Value value, double ageing)` Adds an assignment
`boolean` | `contains(Assignment assignment)` Returns true if it contains the given assignment
`boolean` | `contains(AssignmentSet assignmentSet)`
`boolean` | `contains(Collection assignments)`
`boolean` | `contains(Value value)` Returns true if it contains the given assignment
`boolean` | `contains(Variable variable)` Returns true if it contains the given assignment (assigned variable)
`static AssignmentSet` | `createAssignmentSet(long iteration, Collection assignments, double ageing)` Create set of assignments from the list of Assignments, Values or (assigned) Variables
`boolean` | `equals(Object o)` Compares two assignment sets -- name, size and content (assignments) has to match.
`Assignment` | `getAssignment(Value value)` Returns assignment that corresponds to the given value (if it is present in the set)
`Constraint` | `getConstraint()` Returns constraint
`int` | `getCounter()` Returns counter
`String` | `getDescription()` Returns description
`String` | `getName()` Returns name
`Vector` | `getSet()` Returns set of assignments
`int` | `hashCode()`
`void` | `incCounter()` Increment counter
`void` | `setConstraint(Constraint constraint)` Sets constraint
`void` | `setDescription(String description)` Sets description
`void` | `setName(String name)` Sets name
`int` | `size()` Returns number of assignments in the set
`static int` | `xor(int a, int b)`

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

Constructor Detail

### AssignmentSet

    public AssignmentSet()

### AssignmentSet

    public AssignmentSet(Assignment[] assignments)

### AssignmentSet

    public AssignmentSet(Collection assignments)

Method Detail

### createAssignmentSet

    public static AssignmentSet createAssignmentSet(long iteration,
                                                    Collection assignments,
                                                    double ageing)

  Create set of assignments from the list of Assignments, Values or (assigned) Variables

### incCounter

    public void incCounter()

  Increment counter

### getCounter

    public int getCounter()

  Returns counter

### getSet

    public Vector getSet()

  Returns set of assignments

### getName

    public String getName()

  Returns name

### setName

    public void setName(String name)

  Sets name

### getDescription

    public String getDescription()

  Returns description

### setDescription

    public void setDescription(String description)

  Sets description

### getConstraint

    public Constraint getConstraint()

  Returns constraint

### setConstraint

    public void setConstraint(Constraint constraint)

  Sets constraint

### contains

    public boolean contains(Assignment assignment)

  Returns true if it contains the given assignment

### contains

    public boolean contains(AssignmentSet assignmentSet)

### contains

    public boolean contains(Value value)

  Returns true if it contains the given assignment

### contains

    public boolean contains(Variable variable)

  Returns true if it contains the given assignment (assigned variable)

### contains

    public boolean contains(Collection assignments)

### addAssignment

    public void addAssignment(Assignment assignment)

  Adds an assignment

### addAssignment

    public void addAssignment(long iteration,
                              Value value,
                              double ageing)

  Adds an assignment

### getAssignment

    public Assignment getAssignment(Value value)

  Returns assignment that corresponds to the given value (if it is present in the set)

### size

    public int size()

  Returns number of assignments in the set

### equals

    public boolean equals(Object o)

  Compares two assignment sets -- name, size and content (assignments) has to match.

  Overrides:
    `equals` in class `Object`

### xor

    public static int xor(int a,
                          int b)

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

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