public abstract class TransformationalStateElementAdapterDefinition extends StateElementAdapterDefinition
ReferenceFrame
changes.
When creating your own adapters, you must understand the difference between an element definition
and a defined in object. The element definition is an object that, among other things, can provide
the defined in object which is generally a ReferenceFrame
or
Axes
. The defined in object is the object that the motion would be
represented in. For example, when using the NumericalPropagator
, a
PropagationPointElement
would be the element definition, and
its IntegrationFrame
(get
/ set
) would be the
defined in object.
Some objects (element definitions that are Scalars
) do not
have a defined in which is acceptable.
Modifier | Constructor and Description |
---|---|
protected |
TransformationalStateElementAdapterDefinition()
Initializes a new instance.
|
protected |
TransformationalStateElementAdapterDefinition(TransformationalStateElementAdapterDefinition existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkForSameDefinition(StateElementAdapterDefinition other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected abstract boolean |
checkForSameDefinition(TransformationalStateElementAdapterDefinition 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.
|
void |
enumerateDependencies(DependencyEnumerator enumerator)
Enumerates the dependencies of this object by calling
DependencyEnumerator#enumerate(T) for each object that this object directly depends upon. |
Object |
getCurrentDefinedIn()
Gets the current defined in object.
|
protected Object |
getPreviousDefinedIn()
Gets the previous defined in object.
|
protected void |
setCurrentDefinedIn(Object value)
Sets the current defined in object.
|
protected void |
setPreviousDefinedIn(Object value)
Sets the previous defined in object.
|
checkForSameDefinition, getAdapter, getElementIdentification, setElementIdentification
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, clone, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, freeze, freezeAggregatedObjects, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
protected TransformationalStateElementAdapterDefinition()
ElementIdentification
(get
/ set
)
must be set before StateElementAdapterDefinition.getAdapter(agi.foundation.coordinates.StateElementAdapterDefinition, agi.foundation.EvaluatorGroup)
is called, as well as
any additional properties derived types require.protected TransformationalStateElementAdapterDefinition(@Nonnull TransformationalStateElementAdapterDefinition 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(StateElementAdapterDefinition 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 StateElementAdapterDefinition
other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected abstract boolean checkForSameDefinition(TransformationalStateElementAdapterDefinition 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()
TransformationalStateElementAdapterDefinition.checkForSameDefinition(agi.foundation.coordinates.StateElementAdapterDefinition)
method.computeCurrentDefinitionHashCode
in class StateElementAdapterDefinition
public void enumerateDependencies(DependencyEnumerator enumerator)
DependencyEnumerator#enumerate(T)
for each object that this object directly depends upon.
Derived classes which contain additional dependencies MUST override this method, call the base
implementation, and enumerate dependencies introduced by the derived class.enumerateDependencies
in interface IEnumerateDependencies
enumerateDependencies
in class StateElementAdapterDefinition
enumerator
- The enumerator that is informed of the dependencies of this object.protected final Object getPreviousDefinedIn()
StateElementAdapterDefinition.getAdapter(agi.foundation.coordinates.StateElementAdapterDefinition, agi.foundation.EvaluatorGroup)
to pass in an old adapter. If there is
no old defined in to work with, then use the CurrentDefinedIn
(get
/ set
) for both the current
and previous. If this is set, then it should take priority over the adapter passed into
StateElementAdapterDefinition.getAdapter(agi.foundation.coordinates.StateElementAdapterDefinition, agi.foundation.EvaluatorGroup)
protected final void setPreviousDefinedIn(Object value)
StateElementAdapterDefinition.getAdapter(agi.foundation.coordinates.StateElementAdapterDefinition, agi.foundation.EvaluatorGroup)
to pass in an old adapter. If there is
no old defined in to work with, then use the CurrentDefinedIn
(get
/ set
) for both the current
and previous. If this is set, then it should take priority over the adapter passed into
StateElementAdapterDefinition.getAdapter(agi.foundation.coordinates.StateElementAdapterDefinition, agi.foundation.EvaluatorGroup)
public final Object getCurrentDefinedIn()
protected final void setCurrentDefinedIn(Object value)