edu.washington.cs.sounddetector.server.api.methodresult
Class GetSoundResult

java.lang.Object
  extended by edu.washington.cs.sounddetector.server.api.MethodResult<GetSound>
      extended by edu.washington.cs.sounddetector.server.api.methodresult.GetSoundResult

public class GetSoundResult
extends MethodResult<GetSound>


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.washington.cs.sounddetector.server.api.MethodResult
MethodResult.FailureReason
 
Method Summary
static GetSoundResult failureSoundDoesNotExist(long soundId)
           
 byte[] getSound()
           
 long getSoundId()
           
static GetSoundResult success(byte[] sound)
           
 
Methods inherited from class edu.washington.cs.sounddetector.server.api.MethodResult
getReason, isSuccessful, setReason, setSuccessful, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSound

public byte[] getSound()
Returns:
if MethodResult.isSuccessful() is true, returns the sound requested, otherwise returns null

getSoundId

public long getSoundId()
Returns:
if MethodResult.isSuccessful() is false, returns the id of the sound that was requested but does not exist, otherwise returns null

success

public static GetSoundResult success(byte[] sound)

failureSoundDoesNotExist

public static GetSoundResult failureSoundDoesNotExist(long soundId)


Copyright © 2012. All Rights Reserved.