net.sf.doolin.gui.field.tree.model
Class GUITreeNodeUserObjectPredicate

java.lang.Object
  extended by net.sf.doolin.gui.field.tree.model.GUITreeNodeUserObjectPredicate
All Implemented Interfaces:
com.google.common.base.Predicate<GUITreeNode>

public class GUITreeNodeUserObjectPredicate
extends Object
implements com.google.common.base.Predicate<GUITreeNode>

This predicate checks the user object associated with a GUITreeNode.


Constructor Summary
GUITreeNodeUserObjectPredicate(Object value, boolean useIdentity)
          Constructor for the predicate.
 
Method Summary
 boolean apply(GUITreeNode n)
           
 Object getValue()
          User object
 boolean isUseIdentity()
          Comparison mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Predicate
equals
 

Constructor Detail

GUITreeNodeUserObjectPredicate

public GUITreeNodeUserObjectPredicate(Object value,
                                      boolean useIdentity)
Constructor for the predicate.

Parameters:
value - The user object to compare against
useIdentity - true if the comparison is done using identity (==), false if the comparison is done using the equals method.
Method Detail

apply

public boolean apply(GUITreeNode n)
Specified by:
apply in interface com.google.common.base.Predicate<GUITreeNode>

getValue

public Object getValue()
User object

Returns:
User object used for the comparison

isUseIdentity

public boolean isUseIdentity()
Comparison mode

Returns:
true if the comparison is done using identity (==), false if the comparison is done using the equals method.


Copyright © 2011. All Rights Reserved.