Add new basic filter.
This commit is contained in:
parent
8200497675
commit
fa7c65a6e6
@ -47,6 +47,21 @@ public class ArcFilterFactory {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 3. Non-private roads for pedestrian and bicycle:
|
||||||
|
filters.add(new ArcFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean isAllowed(Arc arc) {
|
||||||
|
return arc.getRoadInformation().getAccessRestrictions()
|
||||||
|
.isAllowedForAny(AccessMode.FOOT, EnumSet.complementOf(EnumSet
|
||||||
|
.of(AccessRestriction.FORBIDDEN, AccessRestriction.PRIVATE)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Non-private roads for pedestrian.";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 3. Add your own filters here (do not forget to implement toString() to get an
|
// 3. Add your own filters here (do not forget to implement toString() to get an
|
||||||
// understandable output!):
|
// understandable output!):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user