ajout de commentaires dans les interfaces et correction des test
This commit is contained in:
@@ -5,5 +5,10 @@ package src.fr.api;
|
||||
* A public type to organize part types in categories
|
||||
*/
|
||||
public interface Category {
|
||||
|
||||
/*
|
||||
* return the name of the cathegory
|
||||
* @return String, name of the cathegory, non null
|
||||
*/
|
||||
String getName();
|
||||
}
|
||||
@@ -1,6 +1,18 @@
|
||||
package src.fr.api;
|
||||
import java.util.Set;
|
||||
public interface CompatibilityChecker {
|
||||
|
||||
/*
|
||||
* return the list of the incompatibles PartType of a PartType
|
||||
* @param reference : the PartType that we want to see the incompatibilities,non null
|
||||
* @return the Set list of the incompatibles PartType
|
||||
*/
|
||||
Set<PartType> getIncompatibilities(PartType reference);
|
||||
|
||||
/*
|
||||
* return the list of the requirements PartType of a PartType
|
||||
* @param reference : the PartType that we want to see the requirements,non null
|
||||
* @return the Set list of the requirements PartType
|
||||
*/
|
||||
Set<PartType> getRequirements(PartType reference);
|
||||
}
|
||||
@@ -1,8 +1,34 @@
|
||||
package src.fr.api;
|
||||
import java.util.Set;
|
||||
public interface CompatibilityManager extends CompatibilityChecker {
|
||||
|
||||
/*
|
||||
* add a incompatibles PartType to a PartType
|
||||
* @param reference : the PartType that we wish to add incompatibilities
|
||||
* @param target : Set list of incompatibilities PartType to add
|
||||
*/
|
||||
void addIncompatibilities(PartType reference,Set<PartType> target);
|
||||
|
||||
/*
|
||||
* remove a PartType of the incompatibilities of a PartType, warning,
|
||||
* warning : we must also remove the incompatibility from all the other PartTypes which the @param reference in their incompatibility
|
||||
* @param reference : the PartType that we wish to remove a incompatible PartType
|
||||
* @param target : PartType to remove of incompatibility
|
||||
*/
|
||||
void removeIncompatibility(PartType reference, PartType target);
|
||||
|
||||
|
||||
/*
|
||||
* add requirements PartType to a PartType
|
||||
* @param reference : the PartType that we wish to add requirements
|
||||
* @param target : Set list of requirement PartType to add
|
||||
*/
|
||||
void addRequirements(PartType reference, Set<PartType> target);
|
||||
|
||||
/*
|
||||
* remove a PartType of the incompatibilities of a PartType
|
||||
* @param reference : the PartType that we wish to remove a requirement PartType
|
||||
* @param target : PartType to remove of requirement
|
||||
*/
|
||||
void removeRequirement(PartType reference, PartType target);
|
||||
}
|
||||
@@ -1,7 +1,14 @@
|
||||
package src.fr.api;
|
||||
import java.util.Set;
|
||||
public interface Configuration {
|
||||
|
||||
|
||||
/*
|
||||
* @return true if there is no compatibility issue between PartType else false
|
||||
*/
|
||||
boolean isValid();
|
||||
|
||||
|
||||
boolean isComplete();
|
||||
Set<PartType> getSelectedParts();
|
||||
void selectPart(PartType chosenPart);
|
||||
|
||||
Reference in New Issue
Block a user