Class ExtensionPredicates


  • public class ExtensionPredicates
    extends Object
    Predicates handy when working with Extensions
    • Constructor Detail

      • ExtensionPredicates

        public ExtensionPredicates()
    • Method Detail

      • namespaceEquals

        public static com.google.common.base.Predicate<Extension> namespaceEquals​(URI namespace)
        matches namespace of the given extension
        Parameters:
        namespace - ex http://docs.openstack.org/ext/keypairs/api/v1.1
        Returns:
        predicate that will match namespace of the given extension
      • aliasEquals

        public static com.google.common.base.Predicate<Extension> aliasEquals​(String alias)
        matches alias of the given extension
        Parameters:
        alias - ex. os-keypairs
        Returns:
        predicate that will alias of the given extension
      • namespaceOrAliasEquals

        public static com.google.common.base.Predicate<Extension> namespaceOrAliasEquals​(URI namespace,
                                                                                         Collection<URI> namespaceAliases)
        matches namespace of the given extension
        Parameters:
        namespace - ex http://docs.openstack.org/ext/keypairs/api/v1.1
        namespaceAliases - Collection of ex http://docs.openstack.org/compute/ext/keypairs/api/v1.1
        Returns:
        predicate that will match namespace of the given extension
      • nameEquals

        public static com.google.common.base.Predicate<Extension> nameEquals​(String name)
        matches name of the given extension
        Parameters:
        name - ex http://docs.openstack.org/ext/keypairs/api/v1.1
        Returns:
        predicate that will match name of the given extension