Interface TaggableObject
-
- All Known Implementing Classes:
BaseTaggableObject
,Wallet
@Deprecated public interface TaggableObject
Deprecated.Applications should use another mechanism to persist application state dataAn object that can carry around and possibly serialize a map of strings to immutable byte arrays. Tagged objects can have data stored on them that might be useful for an application developer. For example a wallet can store tags, and thus this would be a reasonable place to put any important data items that the bitcoinj API does not allow for: things like exchange rates at the time a transaction was made would currently fall into this category. Of course, it helps interop and other developers if you introduce a real type safe API for a new feature instead of using this so please consider that path, if you find yourself tempted to store tags!
Good tag names won't conflict with other people's code, should you one day decide to merge them. Choose tag names like "com.example:keyowner:02b7e6dc316dfaa19c5a599f63d88ffeae398759b857ca56b2f69de3e815381343" instead of "owner" or just "o". Also, it's good practice to create constants for each string you use, to help avoid typos in string parameters causing confusing bugs!
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description com.google.protobuf.ByteString
getTag(java.lang.String tag)
Deprecated.java.util.Map<java.lang.String,com.google.protobuf.ByteString>
getTags()
Deprecated.com.google.protobuf.ByteString
maybeGetTag(java.lang.String tag)
Deprecated.void
setTag(java.lang.String tag, com.google.protobuf.ByteString value)
Deprecated.
-
-
-
Method Detail
-
maybeGetTag
@Deprecated @Nullable com.google.protobuf.ByteString maybeGetTag(java.lang.String tag)
Deprecated.Returns the immutable byte array associated with the given tag name, or null if there is none.
-
getTag
@Deprecated com.google.protobuf.ByteString getTag(java.lang.String tag)
Deprecated.Returns the immutable byte array associated with the given tag name, or throwsIllegalArgumentException
if that tag wasn't set yet.
-
setTag
@Deprecated void setTag(java.lang.String tag, com.google.protobuf.ByteString value)
Deprecated.Associates the given immutable byte array with the string tag. See the docs for TaggableObject to learn more.
-
getTags
@Deprecated java.util.Map<java.lang.String,com.google.protobuf.ByteString> getTags()
Deprecated.Returns a copy of all the tags held by this object.
-
-