Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

Class StringValuedVisitableSequence<E extends CharSequence>

  extended by dk.rode.thesis.decorator.SequenceDecorator<E>
      extended by dk.rode.thesis.visitor.AbstractVisitableSequence<E>
          extended by dk.rode.thesis.visitor.StringValuedVisitableSequence<E>
Type Parameters:
E - The type of values delivered by this visitable sequence.
All Implemented Interfaces:
Sequence<E>, Copyable<Sequence<E>>, StrictCopyable<Sequence<E>>, Stringable<Sequence<E>>, TypeVisitableSequence<E>, ValueVisitableSequence<E>

public class StringValuedVisitableSequence<E extends CharSequence>
extends AbstractVisitableSequence<E>

A string valued visitable sequence allows any sequence delivering any CharSequence type to become value visitable using the SequenceValueVisitor.visitStringValued(Sequence, Object) visitation method and is type visitable for any known sub-interface of Sequence that is implemented by the sequence.

Gunni Rode / rode.dk
See Also:
DateValuedVisitableSequence, IntegerValuedVisitableSequence, ReflectiveVisitableSequence

Nested Class Summary
Nested classes/interfaces inherited from interface dk.rode.thesis.meta.model.Sequence
Constructor Summary
StringValuedVisitableSequence(Sequence<E> sequence)
Method Summary
<P> void
accept(SequenceValueVisitor<P> visitor, P argument)
          Visits this visitable sequence using the value visitor supplied as visitor.
 StringValuedVisitableSequence<E> copy()
          Returns a deep copy of this object.
Methods inherited from class dk.rode.thesis.visitor.AbstractVisitableSequence
Methods inherited from class dk.rode.thesis.decorator.SequenceDecorator
bounded, consistent, current, equals, getSequence, getStringablePolicy, hashCode, next, reset, state, toString, toString, unique
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dk.rode.thesis.meta.model.Sequence
bounded, consistent, current, next, reset, state, unique
Methods inherited from interface dk.rode.thesis.strategy.Stringable
getStringablePolicy, toString

Constructor Detail


public StringValuedVisitableSequence(Sequence<E> sequence)

sequence - The decorated sequence that will become visitable; cannot be null.
NullPointerException - If sequence is null.
Method Detail


public <P> void accept(SequenceValueVisitor<P> visitor,
                       P argument)
Description copied from interface: ValueVisitableSequence
Visits this visitable sequence using the value visitor supplied as visitor.

Type Parameters:
P - The type of visitor-supplied argument. Use Void for visitors that do not need an additional argument.
visitor - The visitor; never null.
argument - A context supplied argument, if any.
See Also:
SequenceValueVisitor.visitStringValued(Sequence, Object)


public StringValuedVisitableSequence<E> copy()
Returns a deep copy of this object. The decorated sequence is not copied.

The copy; never null.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.