Project Wonder 5.0

er.extensions.foundation
Class ERXArrayUtilities.IsEmptyOperator

java.lang.Object
  extended by 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.


Constructor Summary
ERXArrayUtilities.IsEmptyOperator()
          public empty constructor
 
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
 

Constructor Detail

ERXArrayUtilities.IsEmptyOperator

public ERXArrayUtilities.IsEmptyOperator()
public empty constructor

Method Detail

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.

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.