Class AssertionSet

    • Method Detail

      • createMergedAssertionSet

        public static AssertionSet createMergedAssertionSet​(Collection<AssertionSet> alternatives)
        Creates and returns new assertion set holding content of all provided policy assertion sets.
        This method should not be used to perform a merge of general Policy instances. A client should be aware of the method's result meaning and the difference between merge of Policy instances and merge of AssertionSet instances.
        Parameters:
        alternatives - collection of provided policy assertion sets which content is to be stored in the assertion set. May be null - empty assertion set is returned in such case.
        Returns:
        new instance of assertion set holding the content of all provided policy assertion sets.
      • createAssertionSet

        public static AssertionSet createAssertionSet​(Collection<? extends PolicyAssertion> assertions)
        Creates and returns new assertion set holding a set of provided policy assertions.
        Parameters:
        assertions - collection of provided policy assertions to be stored in the assertion set. May be null.
        Returns:
        new instance of assertion set holding the provided policy assertions
      • emptyAssertionSet

        public static AssertionSet emptyAssertionSet()
      • get

        public Collection<PolicyAssertion> get​(QName name)
        Searches for assertions with given name. Only assertions that are contained as immediate children of the assertion set are searched, i.e. nested policies are not searched.
        Parameters:
        name - The fully qualified name of searched assertion
        Returns:
        List of all assertions matching the requested name. If no assertions are found, the returned list is empty (i.e. null value is never returned).
      • isEmpty

        public boolean isEmpty()
        Returns true if this assertion set contains no assertions.
        Returns:
        true if this assertion set contains no assertions.
      • contains

        public boolean contains​(QName assertionName)
        Returns true if the assertion set contains the assertion name specified in its vocabulary
        Parameters:
        assertionName - the fully qualified name of the assertion
        Returns:
        true, if an assertion with the given name could be found in the assertion set vocabulary false otherwise.
      • compareTo

        public int compareTo​(AssertionSet that)
        An Comparable<T>.compareTo(T o) interface method implementation.
        Specified by:
        compareTo in interface Comparable<AssertionSet>
        Parameters:
        that - other alternative to compare with
      • equals

        public boolean equals​(Object obj)
        An Object.equals(Object obj) method override.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        An Object.hashCode() method override.
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        An Object.toString() method override.
        Overrides:
        toString in class Object