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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.ByteStringReturns the immutable byte array associated with the given tag name, or throwsIllegalArgumentExceptionif that tag wasn't set yet.getTags()Returns a copy of all the tags held by this object.com.google.protobuf.ByteStringmaybeGetTag(String tag) Returns the immutable byte array associated with the given tag name, or null if there is none.voidAssociates the given immutable byte array with the string tag.
-
Field Details
-
tags
-
-
Constructor Details
-
BaseTaggableObject
public BaseTaggableObject()
-
-
Method Details
-
maybeGetTag
Description copied from interface:TaggableObjectReturns the immutable byte array associated with the given tag name, or null if there is none.- Specified by:
maybeGetTagin interfaceTaggableObject
-
getTag
Description copied from interface:TaggableObjectReturns the immutable byte array associated with the given tag name, or throwsIllegalArgumentExceptionif that tag wasn't set yet.- Specified by:
getTagin interfaceTaggableObject
-
setTag
Description copied from interface:TaggableObjectAssociates the given immutable byte array with the string tag. See the docs for TaggableObject to learn more.- Specified by:
setTagin interfaceTaggableObject
-
getTags
Description copied from interface:TaggableObjectReturns a copy of all the tags held by this object.- Specified by:
getTagsin interfaceTaggableObject
-