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 TypeMethodDescriptionvoid
addContent
(DefaultMetadataElement element) Return the element with the specified id ornull
if no such element exists.Return the "content" of this capability.Return the default element of this capability.void
merge
(List<DefaultMetadataElement> otherContent) Merge the content of this instance with the specified content.void
setContent
(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:ServiceCapability
Return the "content" of this capability. The structure of the content vastly depends on thetype
of the capability.- Specified by:
getContent
in classServiceCapability<List<DefaultMetadataElement>>
- Returns:
- the content
-
addContent
-
setContent
-
getDefault
Return the default element of this capability.- Specified by:
getDefault
in interfaceDefaultable<DefaultMetadataElement>
- Returns:
- the default value
-
get
Return the element with the specified id ornull
if no such element exists.- Parameters:
id
- the ID of the element to find- Returns:
- the element or
null
-
merge
Description copied from class:ServiceCapability
Merge the content of this instance with the specified content.- Specified by:
merge
in classServiceCapability<List<DefaultMetadataElement>>
- Parameters:
otherContent
- the content to merge- See Also:
-