public final class CommandUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
countContainersByVersion(Container[] containers,
Version version)
Counts the number of containers for the given version
|
static Container[] |
filterContainers(Container[] containers,
java.lang.String filter)
Filter the containers by id and profiles, using the given filter.
|
static boolean |
matchVersion(Container container,
Version version)
Does the container match the given version.
|
static Container[] |
sortContainers(Container[] containers)
Sorts the containers.
|
static Profile[] |
sortProfiles(Profile[] profiles)
Sorts the profiles.
|
static java.lang.String |
status(Container container)
Lets trim the status to a maximum size of 100 chars
(for example when it has an exception it may be long)
|
public static Profile[] sortProfiles(Profile[] profiles)
profiles
- the profilespublic static Container[] sortContainers(Container[] containers)
containers
- the containerspublic static Container[] filterContainers(Container[] containers, java.lang.String filter)
containers
- the containersfilter
- optional filter to matchpublic static boolean matchVersion(Container container, Version version)
container
- the containerversion
- the versionpublic static java.lang.String status(Container container)
container
- the containerCopyright © 2017 Red Hat. All Rights Reserved.