public final class LookupError
extends java.lang.Object
isAbc()
methods will return true. You can use tag() to determine the
tag associated with this instance.
Open unions may be extended in the future with additional tags. If a new
tag is introduced that this SDK does not recognized, the OTHER value
will be used.
| Modifier and Type | Class and Description |
|---|---|
static class |
LookupError.Tag
Discriminating tag type for
LookupError. |
| Modifier and Type | Field and Description |
|---|---|
static LookupError |
NOT_FILE
We were expecting a file, but the given path refers to something that
isn't a file.
|
static LookupError |
NOT_FOLDER
We were expecting a folder, but the given path refers to something that
isn't a folder.
|
static LookupError |
NOT_FOUND
There is nothing at the given path.
|
static LookupError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static LookupError |
RESTRICTED_CONTENT
The file cannot be transferred because the content is restricted.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getMalformedPathValue()
This instance must be tagged as
LookupError.Tag.MALFORMED_PATH. |
int |
hashCode() |
boolean |
isMalformedPath()
|
boolean |
isNotFile()
|
boolean |
isNotFolder()
|
boolean |
isNotFound()
|
boolean |
isOther()
|
boolean |
isRestrictedContent()
|
static LookupError |
malformedPath(java.lang.String value)
Returns an instance of
LookupError that has its tag set to LookupError.Tag.MALFORMED_PATH. |
LookupError.Tag |
tag()
Returns the tag for this instance.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final LookupError NOT_FOUND
public static final LookupError NOT_FILE
public static final LookupError NOT_FOLDER
public static final LookupError RESTRICTED_CONTENT
public static final LookupError OTHER
Receiving a catch-all value typically indicates this SDK version is not up to date. Consider updating your SDK version to handle the new tags.
public LookupError.Tag tag()
This class is a tagged union. Tagged unions instances are always
associated to a specific tag. This means only one of the isXyz()
methods will return true. Callers are recommended to use the tag
value in a switch statement to properly handle the different
values for this LookupError.
If a tag returned by the server is unrecognized by this SDK, the
LookupError.Tag.OTHER value will be used.
public boolean isMalformedPath()
true if this instance is tagged as LookupError.Tag.MALFORMED_PATH, false otherwise.public static LookupError malformedPath(java.lang.String value)
value - value to assign to this instance.LookupError with its tag set to LookupError.Tag.MALFORMED_PATH.java.lang.IllegalArgumentException - if value is null.public java.lang.String getMalformedPathValue()
LookupError.Tag.MALFORMED_PATH.String value associated with this instance if isMalformedPath() is true.java.lang.IllegalStateException - If isMalformedPath() is false.public boolean isNotFound()
true if this instance is tagged as LookupError.Tag.NOT_FOUND,
false otherwise.public boolean isNotFile()
true if this instance is tagged as LookupError.Tag.NOT_FILE,
false otherwise.public boolean isNotFolder()
true if this instance is tagged as LookupError.Tag.NOT_FOLDER, false otherwise.public boolean isRestrictedContent()
true if this instance is tagged as LookupError.Tag.RESTRICTED_CONTENT, false otherwise.public boolean isOther()
true if this instance is tagged as LookupError.Tag.OTHER,
false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringMultiline()
The returned String may contain newlines.