|
@@ -13,7 +13,7 @@ import java.util.stream.Collectors;
|
13
|
13
|
* @author leon on 06/12/2018.
|
14
|
14
|
*/
|
15
|
15
|
public class Group<TypeOfId extends Serializable,
|
16
|
|
- TypeOfEntity extends IdentifiableInterface> extends AbstractGroup{
|
|
16
|
+ TypeOfEntity extends IdentifiableInterface<TypeOfId>> extends AbstractGroup<TypeOfId, TypeOfEntity>{
|
17
|
17
|
|
18
|
18
|
public Group() {
|
19
|
19
|
}
|
|
@@ -25,7 +25,7 @@ public class Group<TypeOfId extends Serializable,
|
25
|
25
|
|
26
|
26
|
@Override
|
27
|
27
|
public void insert(IdentifiableInterface object) {
|
28
|
|
- group.add(object);
|
|
28
|
+ group.add((TypeOfEntity) object);
|
29
|
29
|
}
|
30
|
30
|
|
31
|
31
|
@Override
|
|
@@ -64,12 +64,11 @@ public class Group<TypeOfId extends Serializable,
|
64
|
64
|
}
|
65
|
65
|
|
66
|
66
|
@Override
|
67
|
|
- public List filter(Predicate predicate) {
|
|
67
|
+ public List<TypeOfEntity> filter(Predicate<TypeOfEntity> predicate) {
|
68
|
68
|
|
69
|
|
- return null;
|
70
|
|
-// group.stream()
|
71
|
|
-// .filter(predicate)
|
72
|
|
-// .collect(Collectors.toList());
|
|
69
|
+ return group.stream()
|
|
70
|
+ .filter(predicate)
|
|
71
|
+ .collect(Collectors.toList());
|
73
|
72
|
}
|
74
|
73
|
|
75
|
74
|
@Override
|