create method
Creates a new Probe
of the specified type
.
Returns null
if a probe cannot be created for this type
.
Implementation
@override
Probe? create(String type) {
switch (type) {
case ContextSamplingPackage.LOCATION:
return LocationProbe();
case ContextSamplingPackage.GEOLOCATION:
return GeoLocationProbe();
case ContextSamplingPackage.GEOFENCE:
return GeofenceProbe();
case ContextSamplingPackage.MOBILITY:
return MobilityProbe();
default:
return null;
}
}