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

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

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

An adaptor to help implement visitors.


Constructor Summary
Sha1DState.VisitorAdapter(T defaultValue)
          Constructs a new visitor adapter.
 
Method Summary
 T visitDownloading(Sha1DState.Downloading<DelegateStateT> state)
          Visits a downloading state.
 T visitFailed(Sha1DState.Failed<DelegateStateT> state)
          Visits a downloading state.
 T visitSha1Mismatch(Sha1DState.Sha1Mismatch<DelegateStateT> state)
          Visits a SHA-1 mismatch state.
 T visitVerifiedSha1(Sha1DState.VerifiedSha1<DelegateStateT> state)
          Visits a verified SHA-1 state.
 T visitVerifyingSha1(Sha1DState.VerifyingSha1<DelegateStateT> state)
          Visits a verifying SHA-1 state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sha1DState.VisitorAdapter

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

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

visitDownloading

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

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

visitFailed

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

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

visitSha1Mismatch

public T visitSha1Mismatch(Sha1DState.Sha1Mismatch<DelegateStateT> state)
Description copied from interface: Sha1DState.Visitor
Visits a SHA-1 mismatch state.

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

visitVerifyingSha1

public T visitVerifyingSha1(Sha1DState.VerifyingSha1<DelegateStateT> state)
Description copied from interface: Sha1DState.Visitor
Visits a verifying SHA-1 state.

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

visitVerifiedSha1

public T visitVerifiedSha1(Sha1DState.VerifiedSha1<DelegateStateT> state)
Description copied from interface: Sha1DState.Visitor
Visits a verified SHA-1 state.

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


Copyright © 2013 LittleShoot. All Rights Reserved.