public class MappingConstraintSolver extends java.lang.Object implements ConstraintSolver, java.lang.Cloneable
Constructor and Description |
---|
MappingConstraintSolver()
Constructs a mapping constraint solver.
|
Modifier and Type | Method and Description |
---|---|
void |
addMapping(java.lang.String eventName1,
java.lang.String eventName2)
Adds a mapping constraint.
|
void |
clear()
Clears all the mapping constraints.
|
MappingConstraintSolver |
clone()
Clones MappingConstraintSolver.
|
boolean |
debugging()
Checks if the debugging option is checked.
|
int |
numConstraints()
Returns the number of mapping constraints.
|
void |
readMapping(java.lang.String filename)
Reads mapping constraints from a file.
|
void |
reset()
Initializes the constraint solver.
|
void |
resolve(java.lang.Iterable<metroIIcomm.Event.Builder> metroIIEventList)
Resolves the MetroII event list, updating the event status based on the
mapping constraints.
|
java.lang.String |
toString()
Returns the adjacency matrix of mapping constraints as a string.
|
void |
turnOffDebugging()
Turns off debugging option.
|
void |
turnOnDebugging()
Turns on debugging option.
|
public MappingConstraintSolver()
public MappingConstraintSolver clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- the object's class does not implement the Cloneable
interface.public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean debugging()
public void turnOnDebugging()
public void turnOffDebugging()
public void resolve(java.lang.Iterable<metroIIcomm.Event.Builder> metroIIEventList)
resolve
in interface ConstraintSolver
metroIIEventList
- a list of MetroII events to be updated.public int numConstraints()
public void reset()
public void addMapping(java.lang.String eventName1, java.lang.String eventName2)
eventName1
- first event in the mapping.eventName2
- second event in the mapping.public void readMapping(java.lang.String filename) throws java.io.IOException
filename
- Filename of the mapping constraint file.java.io.IOException
- a failed or interrupted I/O operations has occurred.