er.extensions.foundation
Class ERXArrayUtilities.IsEmptyOperator
java.lang.Object
er.extensions.foundation.ERXArrayUtilities.IsEmptyOperator
- All Implemented Interfaces:
- com.webobjects.foundation.NSArray.Operator
- Enclosing class:
- ERXArrayUtilities
public static class ERXArrayUtilities.IsEmptyOperator
- extends java.lang.Object
- implements com.webobjects.foundation.NSArray.Operator
Define an NSArray.Operator
for the key isEmpty.
This allows for key value paths like:
myArray.valueForKey("@isEmpty");
Which in this case would return true
if the
myArray.count() == 0, or false
if it is not.
This operator always ends computation. Any keypath following the isEmpty
operator is simply ignored.
Method Summary |
java.lang.Object |
compute(com.webobjects.foundation.NSArray<?> array,
java.lang.String keypath)
returns true if the given array is empty, usefull for WOHyperlink disabled binding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXArrayUtilities.IsEmptyOperator
public ERXArrayUtilities.IsEmptyOperator()
- public empty constructor
compute
public java.lang.Object compute(com.webobjects.foundation.NSArray<?> array,
java.lang.String keypath)
- returns true if the given array is empty, usefull for WOHyperlink disabled binding.
- Specified by:
compute
in interface com.webobjects.foundation.NSArray.Operator
- Parameters:
array
- array to be checked.keypath
- the keypath. This value is ignored.
- Returns:
Boolean.TRUE
if array is empty, Boolean.FALSE
otherwise.
Copyright © 2002 – 2007 Project Wonder.