Interface NamedObjectOps

All Known Subinterfaces:
NamedFunctionOps, NamedFunctionTwoOps, NamedRandomVariableOps<T,RV>
All Known Implementing Classes:
AbstractTaskObject, AbstractWaitTaskQueue, Actor, AnimationLayer2D, AnimationObject2D, AnimationPath2D, AnimationShape2D, BooleanCondition, CartesianGrid2D, Condition, ConnectingLine2D, DefaultNamedObject, DefaultSimObject, DelayTaskQueue, DirectedObject2D, Domain, DomainMember, DoubleCondition, DramaSimObject, FifoServerQueue, FifoTaskQueue, GenericActor, GenericCondition, GenericDomain, GenericDomainMember, GenericGroup, GenericMsgFrwdngInfo, GenericMsgRecipient, GenericSimObject, GenericTaskObject, GraphView, Group, IntegerCondition, LifoServerQueue, LifoTaskQueue, LinearServerQueue, LongCondition, MessageRecipient, Model3DView, MsgForwardingInfo, PlacedAnimationObject2D, PolarGrid, PriorityServerQueue, PriorityTaskQueue, ProcessClock, ServerQueue, SimBinomialBooleanRV, SimBinomialBooleanRVRV, SimBinomialDoubleRV, SimBinomialDoubleRVRV, SimBinomialIATimeRV, SimBinomialIATimeRVRV, SimBinomialIntegerRV, SimBinomialIntegerRVRV, SimBinomialLongRV, SimBinomialLongRVRV, SimBooleanRV, SimBooleanRVRV, SimDetermBooleanRV, SimDetermDoubleRV, SimDetermIATimeRV, SimDetermIntegerRV, SimDetermLongRV, SimDoubleRV, SimDoubleRVRV, SimExpDistrRV, SimExpDistrRVRV, SimFixedBooleanRV, SimFixedBooleanRVRV, SimFixedDoubleRV, SimFixedDoubleRVRV, SimFixedIATimeRV, SimFixedIATimeRVRV, SimFixedIntegerRV, SimFixedIntegerRVRV, SimFixedLongRV, SimFixedLongRVRV, SimFunction, SimFunctionTwo, SimGaussianIATimeRV, SimGaussianIATimeRVRV, SimGaussianRV, SimGaussianRVRV, SimIntegerRV, SimIntegerRVRV, SimInterarrivalTimeRV, SimInterarrivalTimeRVRV, SimLogNormalRV, SimLogNormalRVRV, SimLongRV, SimLongRVRV, SimObject, SimPoissonDoubleRV, SimPoissonDoubleRVRV, SimPoissonIATimeRV, SimPoissonIATimeRVRV, SimPoissonIntegerRV, SimPoissonIntegerRVRV, SimPoissonLongRV, SimPoissonLongRVRV, SimRandomVariable, SimRandomVariableRV, SimRandomVariableRVN, SimUniformBooleanRV, SimUniformDoubleRV, SimUniformDoubleRVRV, SimUniformIATimeRV, SimUniformIATimeRVRV, SimUniformIntegerRV, SimUniformIntegerRVRV, SimUniformLongRV, SimUniformLongRVRV, TaskQueue, TraceSet, WaitTaskQueue

public interface NamedObjectOps
Interface for Named Objects. This interface is provided mostly for documentation as javadoc may not show classes that are not declared to be public as is the case with named-object helper classes. The public named-object class should implement this interface so that javdocs will provide appropriate documentation.

Note that the protected methods getObjectNamer() and onDelete() may not be documented due to it being defined in a class that is not public. The method getObjectNamer is an access method that returns the object namer associated with a named object, casting it to a type specified by @NamedObject. The method onDelete() will be called once when delete() is called. onDelete() must either call super.onDelete() just before exiting or arrange for super.onDelete() to be called at some later time.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine if this named object can be deleted.
    boolean
    Delete an object.
    boolean
    Determine if an object is being deleted.
    Get an object's name.
    boolean
    Determine if an object has been deleted.
    boolean
    Determine if an object is interned in a object namer's tables.
  • Method Details

    • isInterned

      boolean isInterned()
      Determine if an object is interned in a object namer's tables.
      Returns:
      true if the object is interned; false if not
    • getName

      String getName()
      Get an object's name.
      Returns:
      the name of the object
    • canDelete

      boolean canDelete()
      Determine if this named object can be deleted. A named object can be deleted if the method delete has not been called and if the object is not in a state that prevents the object from being deleted. Subclasses that override this method must call canDelete() for their superclasses and return false if the superclass' canDelete method returns false. The default method returns true if delete() has not been called and returned true.
      Returns:
      true if this object can be deleted; false otherwise
    • delete

      boolean delete()
      Delete an object. An object can only be deleted once. If this method returns true, the object (if interned) will have been removed from the object namer tables.

      The implementations provided by DefaultNamedObect and generated because of a @NamedObject annotation provide a protected method named onDelete. A subclass that overrides onDelete() must call the onDelete method of its superclass after it's onDelete method has been called and any cleanup actions performed. In some cases, this may happen at a later time (e.g., if a thread is used for some of the cleanup operations or if it is otherwise necessary to wait).

      Returns:
      true if the deletion request was accepted; false otherwise
    • isDeleted

      boolean isDeleted()
      Determine if an object has been deleted. An object is deleted if the method delete() has been called and returned true and the deletion is not pending.
      Returns:
      true if deleted; false otherwise
    • deletePending

      boolean deletePending()
      Determine if an object is being deleted. An deletion is pending if the method delete() has been called and returned true but the deletion has not been completed.
      Returns:
      true if deletion is pending; false otherwise