public abstract class SimpleRouteProcedure extends RouteProcedure
RouteProfile
associated with the surface path.Modifier | Constructor and Description |
---|---|
protected |
SimpleRouteProcedure()
Initializes a new instance.
|
protected |
SimpleRouteProcedure(double speed,
double height,
RouteHeightReference heightReference)
Create a new instance based on the given constant height and speed with respect to the surface
of the
Earth (get ). |
protected |
SimpleRouteProcedure(double speed,
double height,
TerrainProvider terrain)
Create a new instance based on the given constant height and speed with respect to the
given terrain surface.
|
protected |
SimpleRouteProcedure(RouteProfile profile)
Create a new instance based on the given profile.
|
protected |
SimpleRouteProcedure(SimpleRouteProcedure existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkForSameDefinition(RouteProcedure other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected abstract boolean |
checkForSameDefinition(SimpleRouteProcedure other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
ConfigurableProfile |
createConfigurableProfile(SurfaceSegment surfacePath)
Create a profile based on the given settings that the
RoutePropagator can
use to configure this profile in relation to all other profiles along the route. |
RouteProfile |
getProfile()
Gets the profile associated with this procedure.
|
void |
setProfile(RouteProfile value)
Sets the profile associated with this procedure.
|
void |
setProfileFromHeight(double speed,
double height)
Set the profile to a given constant height and speed with respect to
the
Earth . |
void |
setProfileFromHeightAboveMeanSeaLevel(double speed,
double height)
|
void |
setProfileFromHeightAboveSurface(double speed,
double height)
|
void |
setProfileFromHeightAboveTerrain(double speed,
double height,
TerrainProvider terrain)
|
checkForSameDefinition, getSurfacePath
checkForSameDefinition
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, clone, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, enumerateDependencies, freeze, freezeAggregatedObjects, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
protected SimpleRouteProcedure()
protected SimpleRouteProcedure(RouteProfile profile)
profile
- The profile to associate with this procedure.protected SimpleRouteProcedure(double speed, double height, @Nonnull RouteHeightReference heightReference)
Earth
(get
).protected SimpleRouteProcedure(double speed, double height, @Nonnull TerrainProvider terrain)
speed
- The constant speed with respect to the terrain's surface Shape
(get
/ set
).height
- The constant height above the terrain.terrain
- The terrain surface over which to traverse.ArgumentNullException
- Thrown when terrain
is null
.protected SimpleRouteProcedure(@Nonnull SimpleRouteProcedure existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
- The existing instance to copy.context
- A CopyContext
that controls the depth of the copy.ArgumentNullException
- Thrown when existingInstance
or context
is null
.protected final boolean checkForSameDefinition(RouteProcedure other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.checkForSameDefinition
in class RouteProcedure
other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected abstract boolean checkForSameDefinition(SimpleRouteProcedure other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected int computeCurrentDefinitionHashCode()
SimpleRouteProcedure.checkForSameDefinition(agi.foundation.routedesign.RouteProcedure)
method.computeCurrentDefinitionHashCode
in class RouteProcedure
public final RouteProfile getProfile()
public final void setProfile(RouteProfile value)
public final void setProfileFromHeight(double speed, double height)
Earth
. If the
MeanSeaLevel
(get
/ set
) is available,
it will use that as the height reference surface.speed
- The speed at which to traverse over the surface.height
- The constant height with respect to the Earth's reference surface.public final void setProfileFromHeightAboveSurface(double speed, double height)
Shape
(get
/ set
) of the
Earth
(get
).speed
- The speed at which to traverse over the surface.height
- The constant height with respect to the Earth's reference surface.public final void setProfileFromHeightAboveMeanSeaLevel(double speed, double height)
MeanSeaLevel
(get
/ set
) of the
Earth
(get
).speed
- The speed at which to traverse over the surface.height
- The constant height with respect to the Earth's reference surface.public final void setProfileFromHeightAboveTerrain(double speed, double height, @Nonnull TerrainProvider terrain)
Shape
(get
/ set
).speed
- The speed at which to traverse over the surface path.height
- The constant height above the terrain.terrain
- The terrain surface.ArgumentNullException
- Thrown when terrain
is null
.public ConfigurableProfile createConfigurableProfile(SurfaceSegment surfacePath)
RoutePropagator
can
use to configure this profile in relation to all other profiles along the route.createConfigurableProfile
in class RouteSegment
surfacePath
- The surface path over which the profile is defined.RoutePropagator
to
configure the route.