|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectAssignment
public class Assignment
Stores a vector of integers. These integers correspond to variable assignments.
| Constructor Summary | |
|---|---|
Assignment(Assignment a)
Constructs a clone of a. |
|
Assignment(int numVars)
Constructs an assignment of uninitialized variables. |
|
| Method Summary | |
|---|---|
void |
assignVar(int var,
int set)
Assigns a variable to true(1), false(0), or unassigned(-1). |
int |
findFirstUnassignedVar()
Find the first unassigned variable |
java.util.Vector |
getAssignment()
Returns the assignment vector. |
boolean |
getNumUnassignedVars()
Returns the number of unassigned variables |
int |
getValue(int i)
Returns the value at the specified position |
java.lang.String |
toString()
Prints out the assignment as a string. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait,
wait |
| Constructor Detail |
|---|
public Assignment(int numVars)
numVars - the number of
variables.public Assignment(Assignment a)
a - another assignment.| Method Detail |
|---|
public void assignVar(int var,
int set)
var - the variable to be
assigned.set - the integer that the variable will be
assignedpublic java.util.Vector getAssignment()
public int getValue(int i)
i - the position
public int findFirstUnassignedVar()
public boolean getNumUnassignedVars()
public java.lang.String toString()
toString in class
java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||