Package com.sun.xml.ws.policy
Class AssertionSet
java.lang.Object
com.sun.xml.ws.policy.AssertionSet
- All Implemented Interfaces:
Comparable<AssertionSet>,Iterable<PolicyAssertion>
public final class AssertionSet
extends Object
implements Iterable<PolicyAssertion>, Comparable<AssertionSet>
The AssertionSet is a set of assertions. It represents a single policy alternative.
- Author:
- Fabian Ritzmann, Marek Potociar
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(AssertionSet that) AnComparable<T>.compareTo(T o)interface method implementation.booleanReturns true if the assertion set contains the assertion name specified in its vocabularystatic AssertionSetcreateAssertionSet(Collection<? extends PolicyAssertion> assertions) Creates and returns new assertion set holding a set of provided policy assertions.static AssertionSetcreateMergedAssertionSet(Collection<AssertionSet> alternatives) Creates and returns new assertion set holding content of all provided policy assertion sets.static AssertionSetbooleanAnObject.equals(Object obj)method override.Searches for assertions with given name.inthashCode()AnObject.hashCode()method override.booleanisEmpty()Returnstrueif this assertion set contains no assertions.iterator()Returns an iterator over a set of child policy assertion objects.toString()AnObject.toString()method override.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
createMergedAssertionSet
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 benull- empty assertion set is returned in such case.- Returns:
- new instance of assertion set holding the content of all provided policy assertion sets.
-
createAssertionSet
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 benull.- Returns:
- new instance of assertion set holding the provided policy assertions
-
emptyAssertionSet
-
iterator
Returns an iterator over a set of child policy assertion objects.- Specified by:
iteratorin interfaceIterable<PolicyAssertion>- Returns:
- policy assertion Iterator.
-
get
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.
nullvalue is never returned).
-
isEmpty
public boolean isEmpty()Returnstrueif this assertion set contains no assertions.- Returns:
trueif this assertion set contains no assertions.
-
contains
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 vocabularyfalseotherwise.
-
compareTo
AnComparable<T>.compareTo(T o)interface method implementation.- Specified by:
compareToin interfaceComparable<AssertionSet>- Parameters:
that- other alternative to compare with
-
equals
AnObject.equals(Object obj)method override. -
hashCode
public int hashCode()AnObject.hashCode()method override. -
toString
AnObject.toString()method override.
-