private static class PackageSorter.SortModule
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList |
dependSubsystems
A list of all directly dependent subsystems.
|
private int |
position
stores the relative position of the module in the global list.
|
private PackageState |
state
The package state of the to be matched module.
|
Constructor and Description |
---|
SortModule(PackageState state)
Creates a new SortModule for the given package state.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compares this module against an other sort module.
|
java.util.ArrayList |
getDependSubsystems()
Returns the list of all dependent subsystems.
|
int |
getPosition()
Returns the current position of this module in the global list.
|
PackageState |
getState()
Returns the package state contained in this SortModule.
|
void |
setDependSubsystems(java.util.ArrayList dependSubsystems)
Defines a list of dependent subsystems for this module.
|
void |
setPosition(int position)
Defines the position of this module in the global list of all
known modules.
|
java.lang.String |
toString()
Returns a basic string representation of this SortModule.
|
private int position
private final PackageState state
private java.util.ArrayList dependSubsystems
public SortModule(PackageState state)
state
- the package state object, that should be wrapped up
by this class.public java.util.ArrayList getDependSubsystems()
public void setDependSubsystems(java.util.ArrayList dependSubsystems)
dependSubsystems
- a list of all dependent subsystems.public int getPosition()
public void setPosition(int position)
position
- the position.public PackageState getState()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- the other sort module instance.Comparable.compareTo(java.lang.Object)