org.lastbamboo.common.download
Class MoverDState.VisitorAdapter<T,DelegateStateT>

java.lang.Object
  extended by org.lastbamboo.common.download.MoverDState.VisitorAdapter<T,DelegateStateT>
Type Parameters:
T - The type of this visitor's return value.
DelegateStateT - The type of delegate state held in the mover state.
All Implemented Interfaces:
MoverDState.Visitor<T,DelegateStateT>
Enclosing interface:
MoverDState<DelegateStateT>

public abstract static class MoverDState.VisitorAdapter<T,DelegateStateT>
extends Object
implements MoverDState.Visitor<T,DelegateStateT>

An adaptor to help implement visitors.


Constructor Summary
MoverDState.VisitorAdapter(T defaultValue)
          Constructs a new visitor adapter.
 
Method Summary
 T visitDownloading(MoverDState.Downloading<DelegateStateT> state)
          Visits a downloading state.
 T visitFailed(MoverDState.Failed<DelegateStateT> state)
          Visits a failed state.
 T visitMoved(MoverDState.Moved<DelegateStateT> state)
          Visits a moved state.
 T visitMovedToITunes(MoverDState.MovedToITunes<DelegateStateT> state)
          Visits a moved to iTunes state.
 T visitMoveFailed(MoverDState.MoveFailed<DelegateStateT> state)
          Visits a move failed state.
 T visitMoving(MoverDState.Moving<DelegateStateT> state)
          Visits a moving state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoverDState.VisitorAdapter

public MoverDState.VisitorAdapter(T defaultValue)
Constructs a new visitor adapter.

Parameters:
defaultValue - The default value returned by this visitor.
Method Detail

visitDownloading

public T visitDownloading(MoverDState.Downloading<DelegateStateT> state)
Description copied from interface: MoverDState.Visitor
Visits a downloading state.

Specified by:
visitDownloading in interface MoverDState.Visitor<T,DelegateStateT>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitFailed

public T visitFailed(MoverDState.Failed<DelegateStateT> state)
Description copied from interface: MoverDState.Visitor
Visits a failed state.

Specified by:
visitFailed in interface MoverDState.Visitor<T,DelegateStateT>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitMoving

public T visitMoving(MoverDState.Moving<DelegateStateT> state)
Description copied from interface: MoverDState.Visitor
Visits a moving state.

Specified by:
visitMoving in interface MoverDState.Visitor<T,DelegateStateT>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitMoved

public T visitMoved(MoverDState.Moved<DelegateStateT> state)
Description copied from interface: MoverDState.Visitor
Visits a moved state.

Specified by:
visitMoved in interface MoverDState.Visitor<T,DelegateStateT>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitMovedToITunes

public T visitMovedToITunes(MoverDState.MovedToITunes<DelegateStateT> state)
Description copied from interface: MoverDState.Visitor
Visits a moved to iTunes state.

Specified by:
visitMovedToITunes in interface MoverDState.Visitor<T,DelegateStateT>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitMoveFailed

public T visitMoveFailed(MoverDState.MoveFailed<DelegateStateT> state)
Description copied from interface: MoverDState.Visitor
Visits a move failed state.

Specified by:
visitMoveFailed in interface MoverDState.Visitor<T,DelegateStateT>
Parameters:
state - The state.
Returns:
The result of the visitation.


Copyright © 2013 LittleShoot. All Rights Reserved.