Package io.quarkus.bootstrap.model
Interface Mappable
- All Known Subinterfaces:
ApplicationModel,ArtifactSources,Dependency,ExtensionCapabilities,JvmOption,PlatformImports,ResolvableDependency,ResolvedDependency,SourceDir,WorkspaceModule,WorkspaceModule.Mutable
- All Known Implementing Classes:
AppArtifact,AppDependency,ArtifactDependency,CapabilityContract,DefaultApplicationModel,DefaultArtifactSources,DefaultSourceDir,DefaultWorkspaceModule,DefaultWorkspaceModule.Builder,ExtensionDevModeConfig,LazySourceDir,MutableBaseJvmOption,MutableStandardJvmOption,MutableXxJvmOption,PathFilter,PlatformImportsImpl,PlatformReleaseInfo,ResolvedArtifactDependency,ResolvedDependencyBuilder
public interface Mappable
Implemented by types that can be represented as a
Map.-
Method Summary
Modifier and TypeMethodDescriptionasMap()InvokesasMap(MappableCollectionFactory)with the defaultMappableCollectionFactoryimplementation.asMap(MappableCollectionFactory factory) Returns an instance of aMapthat represents this instance.static <T extends Mappable>
Collection<Object> asMaps(Collection<T> col, MappableCollectionFactory factory) static <T extends Mappable>
Collection<Object> iterableAsMaps(Iterable<T> col, MappableCollectionFactory factory) static Collection<Object> iterableToStringCollection(Iterable<?> col, MappableCollectionFactory factory) Formats a collection of items as a comma-separated string.static Collection<Object> toStringCollection(Collection<?> col, MappableCollectionFactory factory) Formats a collection of items as a comma-separated string.static <T> Collection<Object> toStringCollection(Collection<T> col, Function<T, String> converter, MappableCollectionFactory factory) Formats a collection of items as a comma-separated string.
-
Method Details
-
asMaps
static <T extends Mappable> Collection<Object> asMaps(Collection<T> col, MappableCollectionFactory factory) -
iterableAsMaps
static <T extends Mappable> Collection<Object> iterableAsMaps(Iterable<T> col, MappableCollectionFactory factory) -
iterableToStringCollection
static Collection<Object> iterableToStringCollection(Iterable<?> col, MappableCollectionFactory factory) Formats a collection of items as a comma-separated string. If the argument is null, the method will return null. If the argument is an empty collection, the method will return an empty string.- Parameters:
col- collection- Returns:
- command-separated collection of items
-
toStringCollection
Formats a collection of items as a comma-separated string. If the argument is null, the method will return null. If the argument is an empty collection, the method will return an empty string.- Parameters:
col- collection- Returns:
- command-separated collection of items
-
toStringCollection
static <T> Collection<Object> toStringCollection(Collection<T> col, Function<T, String> converter, MappableCollectionFactory factory) Formats a collection of items as a comma-separated string. If the argument is null, the method will return null. If the argument is an empty collection, the method will return an empty string.- Parameters:
col- collectionconverter- converts an object to string- Returns:
- command-separated collection of items
-
asMap
InvokesasMap(MappableCollectionFactory)with the defaultMappableCollectionFactoryimplementation.- Returns:
- a map representing this instance
-
asMap
Returns an instance of aMapthat represents this instance.- Parameters:
factory- collection factory- Returns:
- a map representing this instance
-