public class AisPacketFiltersStateful extends AisPacketFiltersBase
As opposed to the AisPacketFilters class, this class is designed to create predicates which "remember" some state of AisPackets that have previously been served. This implies, that it is possible to establish more advanced filtering, than just inspecting the current AisPacket.
Instead, with this stateful filter, it is possible to generate Predicates which can e.g. filter away AisStaticCommon packages for targets whose position is outside some defined area.
| Constructor and Description |
|---|
AisPacketFiltersStateful()
Instantiates a new Ais packet filters stateful.
|
| Modifier and Type | Method and Description |
|---|---|
Predicate<AisPacket> |
filterOnTargetCallsign(CompareToOperator operator,
String rhsCallsign)
Return false if this message is known to be related to a target with a callsign not comparing to rhs parameter.
|
Predicate<AisPacket> |
filterOnTargetCallsignMatch(String pattern)
Return false if this message is known to be related to a target with a callsign not comparing to rhs parameter.
|
Predicate<AisPacket> |
filterOnTargetCourseOverGround(CompareToOperator operator,
Float cog)
Return false if this message is known to be related to a target with a COG comparing false to 'cog'.
|
Predicate<AisPacket> |
filterOnTargetCourseOverGround(float min,
float max)
Return false if this message is known to be related to a target with a COG outside the given range.
|
Predicate<AisPacket> |
filterOnTargetDraught(CompareToOperator operator,
Float draught)
Return false if this message is known to be related to a target with a draught comparing false to 'draught'.
|
Predicate<AisPacket> |
filterOnTargetDraught(float min,
float max)
Return false if this message is known to be related to a target with a draught outside the given range.
|
Predicate<AisPacket> |
filterOnTargetImo(CompareToOperator operator,
Integer rhsImo)
Return false if this message is known to be related to a target with an IMO no. different to 'imo'.
|
Predicate<AisPacket> |
filterOnTargetImo(Integer[] imos)
Return false if this message is known to be related to a target with an IMO outside the given list.
|
Predicate<AisPacket> |
filterOnTargetImo(int min,
int max)
Return false if this message is known to be related to a target with an IMO outside the given range.
|
Predicate<AisPacket> |
filterOnTargetLatitude(CompareToOperator operator,
Float lat)
Return false if this message is known to be related to a target with a latitude comparing false to 'lat'.
|
Predicate<AisPacket> |
filterOnTargetLatitude(float min,
float max)
Return false if this message is known to be related to a target with a latitude outside the given range.
|
Predicate<AisPacket> |
filterOnTargetLongitude(CompareToOperator operator,
Float lon)
Return false if this message is known to be related to a target with a longitude comparing false to 'lon'.
|
Predicate<AisPacket> |
filterOnTargetLongitude(float min,
float max)
Return false if this message is known to be related to a target with a longitude outside the given range.
|
Predicate<AisPacket> |
filterOnTargetName(CompareToOperator operator,
String rhsName)
Return false if this message is known to be related to a target with a name not comparing to rhs parameter.
|
Predicate<AisPacket> |
filterOnTargetNameMatch(String pattern)
Return false if this message is known to be related to a target with a name not comparing to rhs parameter.
|
Predicate<AisPacket> |
filterOnTargetNavigationalStatus(CompareToOperator operator,
Integer rhsNavstat)
Return false if this message is known to be related to a target with an navstat different to the rhs parameter.
|
Predicate<AisPacket> |
filterOnTargetNavigationalStatus(Integer[] navstats)
Return false if this message is known to be related to a target with a navstat outside the given list.
|
Predicate<AisPacket> |
filterOnTargetNavigationalStatus(int min,
int max)
Return false if this message is known to be related to a target with a navstat outside the given range.
|
Predicate<AisPacket> |
filterOnTargetPositionWithin(dk.dma.enav.model.geometry.Area area)
Filter on message to have known position inside given area.
|
Predicate<AisPacket> |
filterOnTargetShiptype(CompareToOperator operator,
Integer rhsShiptype)
Return false if this message is known to be related to a target with an IMO no. different to 'imo'.
|
Predicate<AisPacket> |
filterOnTargetShiptype(Integer[] shiptypes)
Return false if this message is known to be related to a target with a ship type outside the given list.
|
Predicate<AisPacket> |
filterOnTargetShiptype(int min,
int max)
Return false if this message is known to be related to a target with an shiptype outside the given range.
|
Predicate<AisPacket> |
filterOnTargetSpeedOverGround(CompareToOperator operator,
Float sog)
Return false if this message is known to be related to a target with a SOG comparing false to 'sog'.
|
Predicate<AisPacket> |
filterOnTargetSpeedOverGround(float min,
float max)
Return false if this message is known to be related to a target with a SOG outside the given range.
|
Predicate<AisPacket> |
filterOnTargetTrueHeading(CompareToOperator operator,
Integer hdg)
Return false if this message is known to be related to a target with a COG comparing false to 'hdg'.
|
Predicate<AisPacket> |
filterOnTargetTrueHeading(int min,
int max)
Return false if this message is known to be related to a target with a COG outside the given range.
|
compare, compare, compare, inRange, inRange, matchesGlob, preprocessAisString, preprocessExpressionString, preprocessExpressionStringspublic AisPacketFiltersStateful()
public Predicate<AisPacket> filterOnTargetImo(CompareToOperator operator, Integer rhsImo)
operator - the operatorrhsImo - the rhs imopublic Predicate<AisPacket> filterOnTargetImo(int min, int max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetImo(Integer[] imos)
imos - the imospublic Predicate<AisPacket> filterOnTargetShiptype(CompareToOperator operator, Integer rhsShiptype)
operator - the operatorrhsShiptype - the rhs shiptypepublic Predicate<AisPacket> filterOnTargetShiptype(int min, int max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetShiptype(Integer[] shiptypes)
shiptypes - the shiptypespublic Predicate<AisPacket> filterOnTargetNavigationalStatus(CompareToOperator operator, Integer rhsNavstat)
operator - the operatorrhsNavstat - the rhs navstatpublic Predicate<AisPacket> filterOnTargetNavigationalStatus(int min, int max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetNavigationalStatus(Integer[] navstats)
navstats - the navstatspublic Predicate<AisPacket> filterOnTargetSpeedOverGround(CompareToOperator operator, Float sog)
operator - the operatorsog - the sogpublic Predicate<AisPacket> filterOnTargetSpeedOverGround(float min, float max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetCourseOverGround(CompareToOperator operator, Float cog)
operator - the operatorcog - the cogpublic Predicate<AisPacket> filterOnTargetCourseOverGround(float min, float max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetTrueHeading(CompareToOperator operator, Integer hdg)
operator - the operatorhdg - the hdgpublic Predicate<AisPacket> filterOnTargetTrueHeading(int min, int max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetDraught(CompareToOperator operator, Float draught)
operator - the operatordraught - the draughtpublic Predicate<AisPacket> filterOnTargetDraught(float min, float max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetLatitude(CompareToOperator operator, Float lat)
operator - the operatorlat - the latpublic Predicate<AisPacket> filterOnTargetLatitude(float min, float max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetLongitude(CompareToOperator operator, Float lon)
operator - the operatorlon - the lonpublic Predicate<AisPacket> filterOnTargetLongitude(float min, float max)
min - the minmax - the maxpublic Predicate<AisPacket> filterOnTargetName(CompareToOperator operator, String rhsName)
operator - the operatorrhsName - the rhs namepublic Predicate<AisPacket> filterOnTargetNameMatch(String pattern)
pattern - the patternpublic Predicate<AisPacket> filterOnTargetCallsign(CompareToOperator operator, String rhsCallsign)
operator - the operatorrhsCallsign - the rhs callsignpublic Predicate<AisPacket> filterOnTargetCallsignMatch(String pattern)
pattern - the patternCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.