mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-07 02:25:04 +00:00
docs: update filterer
This commit is contained in:
@@ -42,7 +42,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* objects are systems that are aware of threats that they can be vulnerable to. We would like
|
||||
* to have a way to create copy of different system objects but with filtered threats.
|
||||
* The thing is to keep it simple if we add new subtype of {@link Threat}
|
||||
* (for example {@link ProbableThreat}) - we still need to be able to filter by it's properties.
|
||||
* (for example {@link ProbableThreat}) - we still need to be able to filter by its properties.
|
||||
*/
|
||||
@Slf4j
|
||||
public class App {
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import com.iluwatar.filterer.domain.Filterer;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents system that is aware of it's threats with given probability of their occurrence.
|
||||
* Represents system that is aware of its threats with given probability of their occurrence.
|
||||
*/
|
||||
public interface ProbabilisticThreatAwareSystem extends ThreatAwareSystem {
|
||||
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ package com.iluwatar.filterer.threat;
|
||||
import com.iluwatar.filterer.domain.Filterer;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.iluwatar.filterer.domain.Filterer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
+4
-4
@@ -24,10 +24,10 @@
|
||||
*/
|
||||
package com.iluwatar.filterer.threat;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import java.util.List;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SimpleThreatAwareSystemTest {
|
||||
@Test
|
||||
@@ -47,4 +47,4 @@ class SimpleThreatAwareSystemTest {
|
||||
assertEquals(rootkitThreatAwareSystem.threats().size(), 1);
|
||||
assertEquals(rootkitThreatAwareSystem.threats().get(0), rootkit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user