45 lines
1.2 KiB
Java
45 lines
1.2 KiB
Java
package src.fr.api;
|
|
import java.util.Set;
|
|
import java.util.Optional;
|
|
|
|
public interface Configuration {
|
|
/*
|
|
* @return true if there is no compatibility issue between PartType else false
|
|
*/
|
|
boolean isValid();
|
|
|
|
/*
|
|
* @return true if the configuration is valid and done
|
|
*/
|
|
boolean isComplete();
|
|
|
|
/*
|
|
* @return the list of the Part in the configuration
|
|
*/
|
|
public Set<Part> getSelectedParts();
|
|
|
|
/*
|
|
* @return the Part that we chose earlier which has Category we choose
|
|
* it is optional
|
|
* @param catgeory : Category that we want to know about the PartType can be null
|
|
*/
|
|
public Optional<Part> getSelectionForCategory(Category category);
|
|
|
|
/*
|
|
* Select a PartType to add to the configuration
|
|
* @param chosenPart : the PartType that we wish to add to the configuration
|
|
*/
|
|
void selectPart(PartType chosenPart);
|
|
|
|
/*
|
|
* DeSelect PartType has Catgerory catgoryToClear to delete from the configuration
|
|
* @param categoryToClear : the PartType has categoryToClear Category
|
|
* that we wish to delete from the configuration
|
|
*/
|
|
void unselectPartType(Category categoryToClear);
|
|
|
|
/*
|
|
* Remove all PartType from configuation
|
|
*/
|
|
void clear();
|
|
} |