Package org.bitcoinj.utils
Class BaseTaggableObject
java.lang.Object
org.bitcoinj.utils.BaseTaggableObject
- All Implemented Interfaces:
TaggableObject
- Direct Known Subclasses:
Wallet
A simple implementation of
TaggableObject
that uses a hashmap that is
synchronized on this object's Java monitor.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.ByteString
Returns the immutable byte array associated with the given tag name, or throwsIllegalArgumentException
if that tag wasn't set yet.getTags()
Returns a copy of all the tags held by this object.com.google.protobuf.ByteString
maybeGetTag
(String tag) Returns the immutable byte array associated with the given tag name, or null if there is none.void
Associates the given immutable byte array with the string tag.
-
Field Details
-
tags
-
-
Constructor Details
-
BaseTaggableObject
public BaseTaggableObject()
-
-
Method Details
-
maybeGetTag
Description copied from interface:TaggableObject
Returns the immutable byte array associated with the given tag name, or null if there is none.- Specified by:
maybeGetTag
in interfaceTaggableObject
-
getTag
Description copied from interface:TaggableObject
Returns the immutable byte array associated with the given tag name, or throwsIllegalArgumentException
if that tag wasn't set yet.- Specified by:
getTag
in interfaceTaggableObject
-
setTag
Description copied from interface:TaggableObject
Associates the given immutable byte array with the string tag. See the docs for TaggableObject to learn more.- Specified by:
setTag
in interfaceTaggableObject
-
getTags
Description copied from interface:TaggableObject
Returns a copy of all the tags held by this object.- Specified by:
getTags
in interfaceTaggableObject
-