public interface

AttributeSupport

com.atlassian.stash.content.AttributeSupport
Known Indirect Subclasses

Class Overview

Implemented by model classes to which additional attributes can be applied. These attributes can be used to provide auxiliary information about a given object. For example, attributes are used to attach JIRA issue keys to changesets.

Summary

Public Methods
@Nonnull Set<String> getAttributeValues(String name)
Return the attribute values for attribute name, or an empty set if the specified attribute has no values.
@Nonnull AttributeMap getAttributes()
A map of attributes that have been associated with the object.

Public Methods

@Nonnull public Set<String> getAttributeValues (String name)

Return the attribute values for attribute name, or an empty set if the specified attribute has no values. This is a convenience wrapper for getAttributes().get(name), which will return null for attributes with no values.

Parameters
name the attribute name
Returns
  • the set of attribute values, which may be empty but never null

@Nonnull public AttributeMap getAttributes ()

A map of attributes that have been associated with the object.

While the returned attributes are guaranteed to be non-null, they may be empty.

Returns
  • the attribute map, which may be empty but never null