Class LocalObjectTracker.ObjectLink

java.lang.Object
org.ka2ddo.yaac.core.LocalObjectTracker.ObjectLink
All Implemented Interfaces:
SupportsExtraData
Enclosing class:
LocalObjectTracker

public static class LocalObjectTracker.ObjectLink extends Object implements SupportsExtraData
This class maintains an association between a local ObjectReport and the ObjectReportSender used to transmit this object to the network (assuming that the Object is enabled for transmission).
Author:
Andrew Pavlin, KA2DDO
  • Method Details

    • getObject

      public ObjectReport getObject()
      Get the ObjectReport associated with this pairing.
      Returns:
      ObjectReport
    • getOrs

      public ObjectReportSender getOrs()
      Get the ObjectReportSender (if any) associated with this pairing's ObjectReport.
      Returns:
      ObjectReportSender
    • setOrs

      public void setOrs(ObjectReportSender ors)
      Specify a new ObjectReportSender for this pairing's ObjectReport.
      Parameters:
      ors - ObjectReportSender to remember
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.
    • getRecordIdentifier

      public Object getRecordIdentifier()
      Return the hashable and comparable identifier for the record.
      Specified by:
      getRecordIdentifier in interface SupportsExtraData
      Returns:
      Object that uniquely identifies the record within its GuiContentType domain
    • getAttachment

      public Object getAttachment(Object key)
      Get a named attachment for this record.
      Specified by:
      getAttachment in interface SupportsExtraData
      Parameters:
      key - Object identifying the particular attachment
      Returns:
      the attached data, or null if no attachment with the specified key
    • putAttachment

      public Object putAttachment(Object key, Object attachment) throws NullPointerException
      Add an attachment to this record.
      Specified by:
      putAttachment in interface SupportsExtraData
      Parameters:
      key - Object that will identify this particular attachment
      attachment - data to be attached
      Returns:
      previous attachment under this key, or null if no previous attachment
      Throws:
      NullPointerException - if a null attachment is specified
    • removeAttachment

      public Object removeAttachment(Object key)
      Remove an attachment from this record.
      Specified by:
      removeAttachment in interface SupportsExtraData
      Parameters:
      key - Object identifying the attachment to be removed
      Returns:
      whatever attachment was formerly associated with this key, or null if no previous attachment