Modifier and Type | Class and Description |
---|---|
static class |
MediaInfo.Tag
Discriminating tag type for
MediaInfo . |
Modifier and Type | Field and Description |
---|---|
static MediaInfo |
PENDING
Indicate the photo/video is still under processing and metadata is not
available yet.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
MediaMetadata |
getMetadataValue()
The metadata for the photo/video.
|
int |
hashCode() |
boolean |
isMetadata()
|
boolean |
isPending()
|
static MediaInfo |
metadata(MediaMetadata value)
Returns an instance of
MediaInfo that has its tag set to MediaInfo.Tag.METADATA . |
MediaInfo.Tag |
tag()
Returns the tag for this instance.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final MediaInfo PENDING
public MediaInfo.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 MediaInfo
.
public boolean isPending()
true
if this instance is tagged as MediaInfo.Tag.PENDING
,
false
otherwise.public boolean isMetadata()
true
if this instance is tagged as MediaInfo.Tag.METADATA
,
false
otherwise.public static MediaInfo metadata(MediaMetadata value)
MediaInfo
that has its tag set to MediaInfo.Tag.METADATA
.
The metadata for the photo/video.
value
- value to assign to this instance.MediaInfo
with its tag set to MediaInfo.Tag.METADATA
.IllegalArgumentException
- if value
is null
.public MediaMetadata getMetadataValue()
This instance must be tagged as MediaInfo.Tag.METADATA
.
MediaMetadata
value associated with this instance if
isMetadata()
is true
.IllegalStateException
- If isMetadata()
is false
.public String toStringMultiline()
The returned String may contain newlines.