站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

SearchInfo (Search API) - NetBeans API Javadoc (Current Development Version)

org.openidex.util/3 3.11

org.openidex.search
Interface SearchInfo


public interface SearchInfo

Defines which DataObjects should be searched. Iterator returned by this interface's method enumerates DataObjects that should be searched.

SearchInfo objects are used by module User Utilities – in actions Find (since User Utilities 1.16) and Find in Projects (since User Utilities 1.23). Action Find obtains SearchInfo from Lookup of nodes the action was invoked on. Action Find in Projects obtains SearchInfo from Lookup of the projects.

Since:
org.openidex.util/3 3.2
See Also:
SearchInfoFactory, DataObject, Node.getLookup(), Project.getLookup()

Method Summary
 boolean canSearch()
          Determines whether the object which provided this SearchInfo can be searched.
 Iterator objectsToSearch()
          Specifies which DataObjects should be searched.
 

Method Detail

canSearch

boolean canSearch()
Determines whether the object which provided this SearchInfo can be searched. This method determines whether the Find action should be enabled for the object or not.

This method must be very quick as it may be called frequently and its speed may influence responsiveness of the whole application. If the exact algorithm for determination of the result value should be slow, it is better to return true than make the method slow.

Returns:
false if the object is known that it cannot be searched; true otherwise
Since:
org.openidex.util/3 3.3

objectsToSearch

Iterator objectsToSearch()
Specifies which DataObjects should be searched. The returned Iterator needn't implement method remove() (i.e. it may throw UnsupportedOperationException instead of actual implementation).

Returns:
iterator which iterates over DataObjects to be searched

org.openidex.util/3 3.11

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.