Class Attribute

  • All Implemented Interfaces:
    io.vertx.lang.rx.RxDelegate

    public class Attribute
    extends Object
    implements io.vertx.lang.rx.RxDelegate
    An attribute is a simple matcher for policies. A Attribute is created from a JsonPointer to the object and a logical operator:

    NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

    • Field Detail

      • __TYPE_ARG

        public static final io.vertx.lang.rx.TypeArg<Attribute> __TYPE_ARG
    • Constructor Detail

      • Attribute

        public Attribute​(Attribute delegate)
      • Attribute

        public Attribute​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDelegate

        public Attribute getDelegate()
        Specified by:
        getDelegate in interface io.vertx.lang.rx.RxDelegate
      • has

        public static Attribute has​(String pointer,
                                    Object value)
        Verifies whether the attribute matches the specified. The value must be in the JsonArray or JsonObject referenced by the json pointer.
        Parameters:
        pointer -
        value -
        Returns:
      • eq

        public static Attribute eq​(String pointer,
                                   Object value)
        Verifies whether the attribute matches the specified. The value must be equal to the value referenced by the json pointer.
        Parameters:
        pointer -
        value -
        Returns:
      • ne

        public static Attribute ne​(String pointer,
                                   Object value)
        Verifies whether the attribute matches the specified. The value must not be equal to the value referenced by the json pointer.
        Parameters:
        pointer -
        value -
        Returns:
      • create

        public static Attribute create​(Function<User,​Boolean> function)
        A custom function to be used during matching.
        Parameters:
        function -
        Returns:
      • match

        public boolean match​(User user)
        Verifies whether the attribute matches the specified user.
        Parameters:
        user - the user.
        Returns:
        true if there's a match