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:
- Serialized Form
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Tag> theC)addTag()Deprecated.Add a new tag instanceAdd a new tag instancevoidclear()booleanbooleancontainsAll(Collection<?> theC)booleanget(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 - ThrowsUnsupportedOperationExceptionNOT SUPPORTED - ThrowsUnsupportedOperationExceptiongetTagsWithScheme(String theScheme)getUserData(String theName)Retrieves any user suplied data in this elementbooleanReturns falseinthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> theC)booleanretainAll(Collection<?> theC)voidsetUserData(String theName, Object theValue)Sets a user supplied data value in this elementintsize()Object[]toArray()<T> T[]toArray(T[] theA)toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Field Details
-
ATTR_CATEGORY
- See Also:
- Constant Field Values
-
ELEMENT_NAME
- See Also:
- Constant Field Values
-
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:
containsAllin interfaceCollection<Tag>- Specified by:
containsAllin 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:
hasFormatCommentin interfaceIBase
-
getFormatCommentsPre
NOT SUPPORTED - ThrowsUnsupportedOperationException- Specified by:
getFormatCommentsPrein interfaceIBase
-
getFormatCommentsPost
NOT SUPPORTED - ThrowsUnsupportedOperationException- Specified by:
getFormatCommentsPostin interfaceIBase
-
getUserData
Description copied from interface:IBaseRetrieves any user suplied data in this element- Specified by:
getUserDatain interfaceIBase
-
setUserData
Description copied from interface:IBaseSets a user supplied data value in this element- Specified by:
setUserDatain interfaceIBase
-
addTag(String, String, String)should be used instead