Package org.refcodes.tabular
Class CompositeRecords<T>
- java.lang.Object
-
- org.refcodes.tabular.CompositeRecords<T>
-
- Type Parameters:
T
- The type managed by theRecords
.
- All Implemented Interfaces:
java.io.Flushable
,java.lang.Iterable<T>
,java.util.Iterator<T>
,org.refcodes.component.Closable
,org.refcodes.component.CompositeComponent
,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.Resetable
,org.refcodes.component.Resumable
,org.refcodes.component.Startable
,org.refcodes.component.Stoppable
,org.refcodes.mixin.Disposable
,Records<T>
public class CompositeRecords<T> extends java.lang.Object implements Records<T>, org.refcodes.component.CompositeComponent
Implementation of theRecords
interface wrapping multipleRecords
instances. TheCompositeRecords
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.CompositeComponent
org.refcodes.component.CompositeComponent.ExtendedCompositeComponent<CTX extends java.lang.Object,CON extends java.lang.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.mixin.Disposable
org.refcodes.mixin.Disposable.Disposedable
-
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
-
-
Constructor Summary
Constructors Constructor Description CompositeRecords(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, java.util.Collection<Records<T>> aRecords)
CompositeRecords(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
CompositeRecords(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, java.util.Collection<Records<T>> aRecords)
CompositeRecords(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
decompose()
void
destroy()
void
dispose()
void
flush()
boolean
hasNext()
void
initialize()
Record<T>
next()
void
open()
void
pause()
void
remove()
void
reset()
void
resume()
void
start()
void
stop()
-
Methods inherited from interface org.refcodes.component.Closable
closeIn, closeQuietly, closeUnchecked
-
-
-
-
Constructor Detail
-
CompositeRecords
@SafeVarargs public CompositeRecords(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
-
CompositeRecords
@SafeVarargs public CompositeRecords(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, Records<T>... aRecords)
- Parameters:
aComponentExecutionStrategy
- The strategy on how to invoke the state change requests (as of theCompositeComponent
) defined methods) on the herein containedComponent
instances. CAUTION: The strategy does not affect on how thenext()
methods of the herein contained instances are invoked.aRecordServeStrategy
- The strategy to be used for serving theRecord
instances.aRecords
- TheRecords
instances from which to serve theRecord
instances.
-
CompositeRecords
public CompositeRecords(org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, java.util.Collection<Records<T>> aRecords)
-
CompositeRecords
public CompositeRecords(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, org.refcodes.controlflow.InvocationStrategy aRecordServeStrategy, java.util.Collection<Records<T>> aRecords)
- Parameters:
aComponentExecutionStrategy
- The strategy on how to invoke the state change requests (as of theCompositeComponent
) defined methods) on the herein containedComponent
instances. CAUTION: The strategy does not affect on how thenext()
methods of the herein contained instances are invoked.aRecordServeStrategy
- The strategy to be used for serving theRecord
instances.aRecords
- TheRecords
instances from which to serve theRecord
instances.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
-
initialize
public void initialize() throws org.refcodes.component.InitializeException
- Specified by:
initialize
in interfaceorg.refcodes.component.Initializable
- Throws:
org.refcodes.component.InitializeException
-
start
public void start() throws org.refcodes.component.StartException
- Specified by:
start
in interfaceorg.refcodes.component.Startable
- Throws:
org.refcodes.component.StartException
-
pause
public void pause() throws org.refcodes.component.PauseException
- Specified by:
pause
in interfaceorg.refcodes.component.Pausable
- Throws:
org.refcodes.component.PauseException
-
resume
public void resume() throws org.refcodes.component.ResumeException
- Specified by:
resume
in interfaceorg.refcodes.component.Resumable
- Throws:
org.refcodes.component.ResumeException
-
stop
public void stop() throws org.refcodes.component.StopException
- Specified by:
stop
in interfaceorg.refcodes.component.Stoppable
- Throws:
org.refcodes.component.StopException
-
decompose
public void decompose()
- Specified by:
decompose
in interfaceorg.refcodes.component.Decomposeable
-
flush
public void flush() throws org.refcodes.component.OpenException
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in interfaceorg.refcodes.component.Flushable
- Throws:
org.refcodes.component.OpenException
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.refcodes.component.Destroyable
-
reset
public void reset()
- Specified by:
reset
in interfaceorg.refcodes.component.Resetable
-
open
public void open() throws org.refcodes.component.OpenException
- Specified by:
open
in interfaceorg.refcodes.component.Openable
- Throws:
org.refcodes.component.OpenException
-
close
public void close()
- Specified by:
close
in interfaceorg.refcodes.component.Closable
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.refcodes.mixin.Disposable
-
-