FileDocCategorySizeDatePackage
NestedPolicy.javaAPI DocExample4930Tue May 29 16:56:34 BST 2007com.sun.xml.ws.policy

NestedPolicy

public final class NestedPolicy extends Policy
A special policy implementation that assures that only no or single policy alternative is possible within this type of policy.
author
Marek Potociar

Fields Summary
private static final String
NESTED_POLICY_TOSTRING_NAME
Constructors Summary
private NestedPolicy(AssertionSet set)

        
        
        super(NESTED_POLICY_TOSTRING_NAME, Arrays.asList(new AssertionSet[] { set }));
    
private NestedPolicy(String name, String policyId, AssertionSet set)

        super(NESTED_POLICY_TOSTRING_NAME, name, policyId, Arrays.asList(new AssertionSet[] { set }));
    
Methods Summary
static com.sun.xml.ws.policy.NestedPolicycreateNestedPolicy(AssertionSet set)

        return new NestedPolicy(set);
    
static com.sun.xml.ws.policy.NestedPolicycreateNestedPolicy(java.lang.String name, java.lang.String policyId, AssertionSet set)

        return new NestedPolicy(name, policyId, set);
    
public booleanequals(java.lang.Object obj)
An {@code Object.equals(Object obj)} method override.

        if (this == obj) {
            return true;
        }
        
        if (!(obj instanceof NestedPolicy)) {
            return false;
        }
        
        final NestedPolicy that = (NestedPolicy) obj;
        
        return super.equals(that);
    
public AssertionSetgetAssertionSet()
Returns the AssertionSet instance representing a single policy alterantive held wihtin this nested policy object. If the nested policy represents a policy with no alternatives (i.e. nothing is allowed) the method returns {@code null}.

return
nested policy alternative represented by AssertionSet object. May return {@code null} in case the nested policy represents 'nothing allowed' policy.

        final Iterator<AssertionSet> iterator = iterator();
        if (iterator.hasNext()) {
            return iterator.next();
        } else {
            return null;
        }
    
public inthashCode()

        return super.hashCode();
    
public java.lang.StringtoString()
An {@code Object.toString()} method override.

        return toString(0, new StringBuffer()).toString();
    
java.lang.StringBuffertoString(int indentLevel, java.lang.StringBuffer buffer)
A helper method that appends indented string representation of this instance to the input string buffer.

param
indentLevel indentation level to be used.
param
buffer buffer to be used for appending string representation of this instance
return
modified buffer containing new string representation of the instance

        return super.toString(indentLevel, buffer);