Class StartsWithContainerValidator

  • All Implemented Interfaces:
    Validator

    public class StartsWithContainerValidator
    extends Object
    implements Validator
    Validate that a container id starts with a specific value.
    • Constructor Detail

      • StartsWithContainerValidator

        public StartsWithContainerValidator​(String... containerIdPrefix)
        Saves attributes.
        Parameters:
        containerIdPrefix - Container identifier prefix. this.containerIdPrefix = containerIdPrefix;
    • Method Detail

      • validate

        public boolean validate​(String containerId,
                                ContainerType type)
        Check if the container id starts with the passed container id prefix. Validate if a container has a given configuration.
        Specified by:
        validate in interface Validator
        Parameters:
        containerId - Container identifier.
        type - Container type.
        Returns:
        true if the given container supports the current validator, false otherwise.