Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.net.policies
Class NotPolicy

java.lang.Object
  extended by com.jivesoftware.forum.net.policies.NotPolicy
All Implemented Interfaces:
AcceptPolicy

public class NotPolicy
extends java.lang.Object
implements AcceptPolicy

Performs a basic logical NOT evaluation on a child policy (e.g. turns true to false and false to true).

This policy is useful for combining simpler policies to create complex policy decisions.


Constructor Summary
NotPolicy(AcceptPolicy policy)
          Create an NOT policy for the given policy.
 
Method Summary
 boolean evaluate(Connection connection)
          Reverse the decision of this policies policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotPolicy

public NotPolicy(AcceptPolicy policy)

Create an NOT policy for the given policy.

Parameters:
policy - the policy that will be NOT'd.
Method Detail

evaluate

public boolean evaluate(Connection connection)

Reverse the decision of this policies policy.

Specified by:
evaluate in interface AcceptPolicy
Parameters:
connection - the connection being evaluated.
Returns:
true if the wrapped policy returns false.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.