Package io.spring.initializr.metadata
Class SingleSelectCapability
java.lang.Object
io.spring.initializr.metadata.ServiceCapability<List<DefaultMetadataElement>>
io.spring.initializr.metadata.SingleSelectCapability
- All Implemented Interfaces:
Defaultable<DefaultMetadataElement>,Cloneable
public class SingleSelectCapability
extends ServiceCapability<List<DefaultMetadataElement>>
implements Defaultable<DefaultMetadataElement>
A
single select capability.- Author:
- Stephane Nicoll
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContent(DefaultMetadataElement element) Return the element with the specified id ornullif no such element exists.Return the "content" of this capability.Return the default element of this capability.voidmerge(List<DefaultMetadataElement> otherContent) Merge the content of this instance with the specified content.voidsetContent(List<DefaultMetadataElement> newContent) Methods inherited from class io.spring.initializr.metadata.ServiceCapability
getDescription, getId, getTitle, getType, merge, setDescription, setTitle
-
Constructor Details
-
SingleSelectCapability
-
-
Method Details
-
getContent
Description copied from class:ServiceCapabilityReturn the "content" of this capability. The structure of the content vastly depends on thetypeof the capability.- Specified by:
getContentin classServiceCapability<List<DefaultMetadataElement>>- Returns:
- the content
-
addContent
-
setContent
-
getDefault
Return the default element of this capability.- Specified by:
getDefaultin interfaceDefaultable<DefaultMetadataElement>- Returns:
- the default value
-
get
Return the element with the specified id ornullif no such element exists.- Parameters:
id- the ID of the element to find- Returns:
- the element or
null
-
merge
Description copied from class:ServiceCapabilityMerge the content of this instance with the specified content.- Specified by:
mergein classServiceCapability<List<DefaultMetadataElement>>- Parameters:
otherContent- the content to merge- See Also:
-