org.lastbamboo.common.download
Class MsDState.VisitorAdapter<T>

java.lang.Object
  extended by org.lastbamboo.common.download.MsDState.VisitorAdapter<T>
Type Parameters:
T - The type of this visitor's return value.
All Implemented Interfaces:
MsDState.Visitor<T>
Enclosing interface:
MsDState

public abstract static class MsDState.VisitorAdapter<T>
extends Object
implements MsDState.Visitor<T>

An adaptor to help implement visitors.


Constructor Summary
MsDState.VisitorAdapter(T defaultValue)
          Constructs a new visitor adapter.
 
Method Summary
 T visitCanceled(MsDState.Canceled state)
          Visits a canceled state.
 T visitComplete(MsDState.Complete state)
          Visits a complete state.
 T visitCouldNotDetermineSources(MsDState.CouldNotDetermineSources state)
          Visits a could not determine sources state.
 T visitFailed(MsDState.Failed state)
          Visits a general failed state.
 T visitGettingSources(MsDState.GettingSources state)
          Visits a getting sources state.
 T visitIdle(MsDState.Idle state)
          Visits an idle state.
 T visitLibTorrentDownloading(MsDState.LibTorrentDownloading libTorrentDownloadingState)
          Visits a downloading state for a LibTorrent download.
 T visitLimeWireDownloading(MsDState.LimeWireDownloading limeWireDownloadingState)
          Visits a downloading state for a LimeWire download.
 T visitLittleShootDownloading(MsDState.LittleShootDownloading littleShootDownloadingState)
          Visits a downloading state for a LittleShoot download.
 T visitNoSourcesAvailable(MsDState.NoSourcesAvailable state)
          Visits a no sources available state.
 T visitPaused(MsDState.Paused state)
          Visits a paused state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsDState.VisitorAdapter

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

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

visitCouldNotDetermineSources

public T visitCouldNotDetermineSources(MsDState.CouldNotDetermineSources state)
Description copied from interface: MsDState.Visitor
Visits a could not determine sources state.

Specified by:
visitCouldNotDetermineSources in interface MsDState.Visitor<T>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitComplete

public T visitComplete(MsDState.Complete state)
Description copied from interface: MsDState.Visitor
Visits a complete state.

Specified by:
visitComplete in interface MsDState.Visitor<T>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitPaused

public T visitPaused(MsDState.Paused state)
Description copied from interface: MsDState.Visitor
Visits a paused state.

Specified by:
visitPaused in interface MsDState.Visitor<T>
Parameters:
state - The paused state.
Returns:
The result of the visitation.

visitCanceled

public T visitCanceled(MsDState.Canceled state)
Description copied from interface: MsDState.Visitor
Visits a canceled state.

Specified by:
visitCanceled in interface MsDState.Visitor<T>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitFailed

public T visitFailed(MsDState.Failed state)
Description copied from interface: MsDState.Visitor
Visits a general failed state.

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

visitGettingSources

public T visitGettingSources(MsDState.GettingSources state)
Description copied from interface: MsDState.Visitor
Visits a getting sources state.

Specified by:
visitGettingSources in interface MsDState.Visitor<T>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitIdle

public T visitIdle(MsDState.Idle state)
Description copied from interface: MsDState.Visitor
Visits an idle state.

Specified by:
visitIdle in interface MsDState.Visitor<T>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitNoSourcesAvailable

public T visitNoSourcesAvailable(MsDState.NoSourcesAvailable state)
Description copied from interface: MsDState.Visitor
Visits a no sources available state.

Specified by:
visitNoSourcesAvailable in interface MsDState.Visitor<T>
Parameters:
state - The state.
Returns:
The result of the visitation.

visitLittleShootDownloading

public T visitLittleShootDownloading(MsDState.LittleShootDownloading littleShootDownloadingState)
Description copied from interface: MsDState.Visitor
Visits a downloading state for a LittleShoot download.

Specified by:
visitLittleShootDownloading in interface MsDState.Visitor<T>
Parameters:
littleShootDownloadingState - The LittleShoot downloading state to visit.
Returns:
The result of the visitation.

visitLimeWireDownloading

public T visitLimeWireDownloading(MsDState.LimeWireDownloading limeWireDownloadingState)
Description copied from interface: MsDState.Visitor
Visits a downloading state for a LimeWire download.

Specified by:
visitLimeWireDownloading in interface MsDState.Visitor<T>
Parameters:
limeWireDownloadingState - The LimeWire downloading state to visit.
Returns:
The result of the visitation.

visitLibTorrentDownloading

public T visitLibTorrentDownloading(MsDState.LibTorrentDownloading libTorrentDownloadingState)
Description copied from interface: MsDState.Visitor
Visits a downloading state for a LibTorrent download.

Specified by:
visitLibTorrentDownloading in interface MsDState.Visitor<T>
Parameters:
libTorrentDownloadingState - The LibTorrent downloading state to visit.
Returns:
The result of the visitation.


Copyright © 2013 LittleShoot. All Rights Reserved.