mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-30 02:22:11 +00:00
* fix: add UnsupportedOperationException in KingsHand and GameLoopTest * refactor: update DatabaseService to use constant for BINARY_DATA and remove obsolete test files * refactor: update timePasses method in KingsHand * refactor CandyGame.java * refactor: simplify boundary checks in CandyGame * feat: add getters for type and points in Candy class and initialize logger in CandyGame * remove class and logger initialization in CandyGame * Modify CandyGame.java * fix Checkstyle violations * Remove generic wildcard type in ThreatAwareSystem
This commit is contained in:
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
/**
|
||||
* Represents system that is aware of threats that are present in it.
|
||||
*/
|
||||
public interface ThreatAwareSystem {
|
||||
public interface ThreatAwareSystem<T extends Threat> {
|
||||
|
||||
/**
|
||||
* Returns the system id.
|
||||
@@ -43,13 +43,13 @@ public interface ThreatAwareSystem {
|
||||
* Returns list of threats for this system.
|
||||
* @return list of threats for this system.
|
||||
*/
|
||||
List<? extends Threat> threats();
|
||||
List<T> threats();
|
||||
|
||||
/**
|
||||
* Returns the instance of {@link Filterer} helper interface that allows to covariantly
|
||||
* specify lower bound for predicate that we want to filter by.
|
||||
* @return an instance of {@link Filterer} helper interface.
|
||||
*/
|
||||
Filterer<? extends ThreatAwareSystem, ? extends Threat> filtered();
|
||||
Filterer<ThreatAwareSystem<T>, T> filtered();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user