Package ca.uhn.fhir.model.api
Class TagList
java.lang.Object
ca.uhn.fhir.model.api.TagList
- All Implemented Interfaces:
Serializable
,Iterable<Tag>
,Collection<Tag>
,Set<Tag>
,IBase
A collection of tags present on a single resource. TagList is backed by a
LinkedHashSet
, so the order of
added tags will be consistent, but duplicates will not be preserved.
Thread safety: This class is not thread safe
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends Tag> theC) addTag()
Deprecated.Add a new tag instanceAdd a new tag instancevoid
clear()
boolean
boolean
containsAll
(Collection<?> theC) boolean
get
(int theIndex) Returns the tag at a given index - Note that the TagList is backed by aLinkedHashSet
, so the order of added tags will be consistent, but duplicates will not be preserved.NOT SUPPORTED - ThrowsUnsupportedOperationException
NOT SUPPORTED - ThrowsUnsupportedOperationException
getTagsWithScheme
(String theScheme) getUserData
(String theName) Retrieves any user suplied data in this elementboolean
Returns falseint
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> theC) boolean
retainAll
(Collection<?> theC) void
setUserData
(String theName, Object theValue) Sets a user supplied data value in this elementint
size()
Object[]
toArray()
<T> T[]
toArray
(T[] theA) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
spliterator
-
Field Details
-
ATTR_CATEGORY
- See Also:
-
ELEMENT_NAME
- See Also:
-
ELEMENT_NAME_LC
-
-
Constructor Details
-
TagList
public TagList()Constructor -
TagList
Copy constructor
-
-
Method Details
-
toString
-
add
-
addAll
-
addTag
Deprecated.Tags wil become immutable in a future release of HAPI, soaddTag(String, String, String)
should be used instead -
addTag
Add a new tag instance- Parameters:
theScheme
- The tag scheme (the system)theTerm
- The tag term (the code)- Returns:
- Returns the newly created tag instance. Note that the tag is added to the list by this method, so you generally do not need to interact directly with the added tag.
-
addTag
Add a new tag instance- Parameters:
theScheme
- The tag schemetheTerm
- The tag termtheLabel
- The tag label- Returns:
- Returns the newly created tag instance. Note that the tag is added to the list by this method, so you generally do not need to interact directly with the added tag.
-
clear
-
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Tag>
- Specified by:
containsAll
in interfaceSet<Tag>
-
equals
-
get
Returns the tag at a given index - Note that the TagList is backed by aLinkedHashSet
, so the order of added tags will be consistent, but duplicates will not be preserved. -
getTag
-
getTagsWithScheme
-
hashCode
-
isEmpty
-
iterator
-
remove
-
removeAll
-
retainAll
-
size
-
toArray
-
toArray
-
hasFormatComment
Returns false- Specified by:
hasFormatComment
in interfaceIBase
-
getFormatCommentsPre
NOT SUPPORTED - ThrowsUnsupportedOperationException
- Specified by:
getFormatCommentsPre
in interfaceIBase
-
getFormatCommentsPost
NOT SUPPORTED - ThrowsUnsupportedOperationException
- Specified by:
getFormatCommentsPost
in interfaceIBase
-
getUserData
Description copied from interface:IBase
Retrieves any user suplied data in this element- Specified by:
getUserData
in interfaceIBase
-
setUserData
Description copied from interface:IBase
Sets a user supplied data value in this element- Specified by:
setUserData
in interfaceIBase
-
addTag(String, String, String)
should be used instead