Sequenceablepublic static class PasteData.DataProperty extends Object implements Sequenceable
PasteData on the system pasteboard, including the timestamp,
MIME types, and additional property data.Sequenceable.Producer<T>| 限定符和类型 | 方法 | 说明 |
|---|---|---|
PacMap |
getAdditions() |
Obtains additional property data.
|
List<String> |
getMimeTypes() |
Obtains non-repeating MIME types of all records in
PasteData. |
CharSequence |
getTag() |
Obtains the user-defined tag of a
PasteData object. |
long |
getTimestamp() |
Obtains a timestamp based on
Time.getCurrentTime(),
which indicates when data is written to the system pasteboard. |
boolean |
hasMimeType(String mimeType) |
Checks whether there is a specified MIME type in a
DataProperty object. |
boolean |
isLocalOnly() |
Checks whether
PasteData is set for local access only. |
boolean |
marshalling(Parcel parcel) |
Marshals a
DataProperty object into a Parcel. |
void |
setAdditions(PacMap extraProps) |
Sets additional property key-value pairs.
|
void |
setLocalOnly(boolean isLocalOnly) |
Sets
PasteData for local access only. |
void |
setTag(CharSequence tag) |
Sets a user-defined tag.
|
boolean |
unmarshalling(Parcel parcel) |
Unmarshals a
DataProperty object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic List<String> getMimeTypes()
PasteData.public boolean hasMimeType(String mimeType)
DataProperty object.mimeType - Indicates a MIME type to search.true if there is the type; returns false otherwise.public long getTimestamp()
Time.getCurrentTime(),
which indicates when data is written to the system pasteboard.0 otherwise.public CharSequence getTag()
PasteData object.public void setTag(CharSequence tag)
tag - Indicates the tag to set.public PacMap getAdditions()
PacMappublic void setAdditions(PacMap extraProps)
extraProps - Indicates a PacMac containing property key-value pairs.PacMappublic boolean isLocalOnly()
PasteData is set for local access only.
If this has not been set before, PasteData in the distributed pasteboard can be shared
between devices by default.true if the PasteData is set to Local Only;
returns false otherwise.public void setLocalOnly(boolean isLocalOnly)
PasteData for local access only.
In the distributed pasteboard scenario, if the passed argument is true,
the PasteData will not be written across devices.
isLocalOnly - Specifies whether the PasteData is set to Local Only.
true indicates the PasteData is accessed locally and cannot be shared among device,
and indicates that the PasteData is shared among devices.public boolean marshalling(Parcel parcel)
DataProperty object into a Parcel.marshalling 在接口中 Sequenceableparcel - Indicates the Parcel object for marshalling.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel parcel)
DataProperty object from a Parcel.unmarshalling 在接口中 Sequenceableparcel - Indicates the Parcel object for unmarshalling.true if the unmarshalling is successful; returns false otherwise.