textbender.g.hold
Class Spool0

java.lang.Object
  extended by java.util.AbstractCollection<Hold>
      extended by Spool0
All Implemented Interfaces:
Iterable<Hold>, Collection<Hold>, Spool

@ThreadSafe
public class Spool0
extends AbstractCollection<Hold>
implements Spool

Null implementation of a spool; it is always empty and never unwinds.


Field Summary
 
Fields inherited from interface Spool
catcher0
 
Constructor Summary
Spool0()
           
 
Method Summary
 boolean add(Hold hold)
          Does nothing.
static Spool0 i()
          A common instance of Spool0.
 boolean isUnwinding()
          Returns true if the spool is unwinding (or unwound).
 Iterator<Hold> iterator()
           
 int size()
           
 boolean unwind()
          Does nothing.
 boolean unwind(Catcher<Hold> catcher)
          Does nothing.
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

Spool0

public Spool0()
Method Detail

i

public static Spool0 i()
A common instance of Spool0.


add

public boolean add(Hold hold)
Does nothing.

Specified by:
add in interface Collection<Hold>
Specified by:
add in interface Spool
Overrides:
add in class AbstractCollection<Hold>
Returns:
true

iterator

public Iterator<Hold> iterator()
Specified by:
iterator in interface Iterable<Hold>
Specified by:
iterator in interface Collection<Hold>
Specified by:
iterator in class AbstractCollection<Hold>

size

public int size()
Specified by:
size in interface Collection<Hold>
Specified by:
size in class AbstractCollection<Hold>
Returns:
zero

isUnwinding

public boolean isUnwinding()
Description copied from interface: Spool
Returns true if the spool is unwinding (or unwound). Once true, it never reverts to false.

Specified by:
isUnwinding in interface Spool
Returns:
false

unwind

public boolean unwind()
Does nothing.

Specified by:
unwind in interface Spool
Returns:
false

unwind

public boolean unwind(Catcher<Hold> catcher)
Does nothing.

Specified by:
unwind in interface Spool
Parameters:
catcher - for any errors or exceptions that occur during unwinding
Returns:
false