Class RecordsComposite<T>

java.lang.Object
org.refcodes.tabular.RecordsComposite<T>
Type Parameters:
T - The type managed by the Records.
All Implemented Interfaces:
Flushable, Iterable<Record<T>>, Iterator<Record<T>>, org.refcodes.component.Closable, org.refcodes.component.ComponentComposite, org.refcodes.component.Decomposeable, org.refcodes.component.Destroyable, org.refcodes.component.Flushable, org.refcodes.component.Initializable, org.refcodes.component.LifecycleComponent, org.refcodes.component.LinkComponent, org.refcodes.component.Openable, org.refcodes.component.Pausable, org.refcodes.component.Resumable, org.refcodes.component.Startable, org.refcodes.component.Stoppable, org.refcodes.mixin.Disposable, org.refcodes.mixin.Resetable, Records<T>

public class RecordsComposite<T> extends Object implements Records<T>, org.refcodes.component.ComponentComposite
Implementation of the Records interface wrapping multiple Records instances. The RecordsComposite makes use of a flavor of the composite pattern.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.component.Closable

    org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>

    Nested classes/interfaces inherited from interface org.refcodes.component.ComponentComposite

    org.refcodes.component.ComponentComposite.ExtendedComponentComposite<CTX extends Object,CON extends Object>

    Nested classes/interfaces inherited from interface org.refcodes.component.Decomposeable

    org.refcodes.component.Decomposeable.DecomposeAutomaton

    Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable

    org.refcodes.component.Destroyable.DestroyAutomaton

    Nested classes/interfaces inherited from interface org.refcodes.component.Flushable

    org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>

    Nested classes/interfaces inherited from interface org.refcodes.component.Initializable

    org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable

    Nested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent

    org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponent

    Nested classes/interfaces inherited from interface org.refcodes.component.LinkComponent

    org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>

    Nested classes/interfaces inherited from interface org.refcodes.component.Openable

    org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>

    Nested classes/interfaces inherited from interface org.refcodes.component.Pausable

    org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable

    Nested classes/interfaces inherited from interface org.refcodes.component.Resumable

    org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumable

    Nested classes/interfaces inherited from interface org.refcodes.component.Startable

    org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable

    Nested classes/interfaces inherited from interface org.refcodes.component.Stoppable

    org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecordsComposite(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Collection<Records<T>> aRecords)
    Constructs a RecordsComposite serving Record instances from multiple Records instances.
    RecordsComposite(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
    Constructs a RecordsComposite serving Record instances from multiple Records instances.
    RecordsComposite(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Collection<Records<T>> aRecords)
    Constructs a RecordsComposite serving Record instances from multiple Records instances.
    RecordsComposite(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
    Constructs a RecordsComposite serving Record instances from multiple Records instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    void
    void
    void
    void
    boolean
    void
    void
    void
    void
    void
    void
    void
    void

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.refcodes.component.Closable

    closeIn, closeQuietly, closeUnchecked

    Methods inherited from interface org.refcodes.component.Flushable

    flushUnchecked, isFlushable

    Methods inherited from interface org.refcodes.component.Initializable

    initializeUnchecked

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface java.util.Iterator

    forEachRemaining

    Methods inherited from interface org.refcodes.component.Openable

    openUnchecked

    Methods inherited from interface org.refcodes.component.Pausable

    pauseUnchecked

    Methods inherited from interface org.refcodes.tabular.Records

    iterator

    Methods inherited from interface org.refcodes.component.Resumable

    resumeUnchecked

    Methods inherited from interface org.refcodes.component.Startable

    startUnchecked

    Methods inherited from interface org.refcodes.component.Stoppable

    stopUnchecked
  • Constructor Details

    • RecordsComposite

      @SafeVarargs public RecordsComposite(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
      Constructs a RecordsComposite serving Record instances from multiple Records instances.
      Parameters:
      aRecordServeStrategy - The strategy to be used for serving the Record instances.
      aRecords - The Records instances from which to serve the Record instances.
    • RecordsComposite

      @SafeVarargs public RecordsComposite(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
      Constructs a RecordsComposite serving Record instances from multiple Records instances.
      Parameters:
      aComponentExecutionStrategy - The strategy on how to invoke the state change requests (as of the ComponentComposite) defined methods) on the herein contained Component instances. CAUTION: The strategy does not affect on how the next() methods of the herein contained instances are invoked.
      aRecordServeStrategy - The strategy to be used for serving the Record instances.
      aRecords - The Records instances from which to serve the Record instances.
    • RecordsComposite

      public RecordsComposite(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Collection<Records<T>> aRecords)
      Constructs a RecordsComposite serving Record instances from multiple Records instances.
      Parameters:
      aRecordServeStrategy - The strategy to be used for serving the Record instances.
      aRecords - The Records instances from which to serve the Record instances.
    • RecordsComposite

      public RecordsComposite(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Collection<Records<T>> aRecords)
      Constructs a RecordsComposite serving Record instances from multiple Records instances.
      Parameters:
      aComponentExecutionStrategy - The strategy on how to invoke the state change requests (as of the ComponentComposite) defined methods) on the herein contained Component instances. CAUTION: The strategy does not affect on how the next() methods of the herein contained instances are invoked.
      aRecordServeStrategy - The strategy to be used for serving the Record instances.
      aRecords - The Records instances from which to serve the Record instances.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public Record<T> next()
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>
    • initialize

      public void initialize() throws org.refcodes.component.InitializeException
      Specified by:
      initialize in interface org.refcodes.component.Initializable
      Throws:
      org.refcodes.component.InitializeException
    • start

      public void start() throws org.refcodes.component.StartException
      Specified by:
      start in interface org.refcodes.component.Startable
      Throws:
      org.refcodes.component.StartException
    • pause

      public void pause() throws org.refcodes.component.PauseException
      Specified by:
      pause in interface org.refcodes.component.Pausable
      Throws:
      org.refcodes.component.PauseException
    • resume

      public void resume() throws org.refcodes.component.ResumeException
      Specified by:
      resume in interface org.refcodes.component.Resumable
      Throws:
      org.refcodes.component.ResumeException
    • stop

      public void stop() throws org.refcodes.component.StopException
      Specified by:
      stop in interface org.refcodes.component.Stoppable
      Throws:
      org.refcodes.component.StopException
    • decompose

      public void decompose()
      Specified by:
      decompose in interface org.refcodes.component.Decomposeable
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Specified by:
      flush in interface org.refcodes.component.Flushable
      Throws:
      IOException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.refcodes.component.Destroyable
    • reset

      public void reset()
      Specified by:
      reset in interface org.refcodes.mixin.Resetable
    • open

      public void open() throws IOException
      Specified by:
      open in interface org.refcodes.component.Openable
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface org.refcodes.component.Closable
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.refcodes.mixin.Disposable