Package PamguardMVC

Class SingletonDataBlock<Tunit extends PamDataUnit>

java.lang.Object
PamguardMVC.PamObservable
PamguardMVC.PamDataBlock<Tunit>
PamguardMVC.SingletonDataBlock<Tunit>

public class SingletonDataBlock<Tunit extends PamDataUnit> extends PamDataBlock<Tunit>
Version of pamdatablock that always keeps one and only one dataUnit.
Author:
Doug
  • Constructor Details

    • SingletonDataBlock

      public SingletonDataBlock(Class unitClass, String dataName, PamProcess parentProcess, int channelMap)
  • Method Details

    • addPamData

      public void addPamData(Tunit pamDataUnit)
      Description copied from class: PamDataBlock
      Adds a new PamDataUnit to the PamDataBlock. When the data unit is added, PamObservers that have subscribed to the block will be notified.
      If the data unit already has a UID, it will be left as is.
      Overrides:
      addPamData in class PamDataBlock<Tunit extends PamDataUnit>
      Parameters:
      pamDataUnit - Reference to a PamDataUnit
    • clearAll

      public void clearAll()
      Description copied from class: PamDataBlock
      Clears all PamDataUnits from memory

      In viewer mode, data are also re-saved.

      Overrides:
      clearAll in class PamDataBlock<Tunit extends PamDataUnit>