public final class MediaInfo
extends java.lang.Object
isAbc()
methods will
return true
. You can use tag()
to determine the tag
associated with this instance.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(java.lang.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.
|
java.lang.String |
toString() |
java.lang.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
.java.lang.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
.java.lang.IllegalStateException
- If isMetadata()
is false
.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.