public enum ResponseSource extends Enum<ResponseSource>
Enum Constant and Description |
---|
CACHE
The response was returned from the local cache.
|
CONDITIONAL_CACHE
The response is available in the cache but must be validated with the
network.
|
NETWORK
The response was returned from the network.
|
Modifier and Type | Method and Description |
---|---|
boolean |
requiresConnection() |
static ResponseSource |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResponseSource[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseSource CACHE
public static final ResponseSource CONDITIONAL_CACHE
public static final ResponseSource NETWORK
public static ResponseSource[] values()
for (ResponseSource c : ResponseSource.values()) System.out.println(c);
public static ResponseSource valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean requiresConnection()
Copyright © 2014. All rights reserved.