org.openide.util.lookup
Class AbstractLookup.Pair<T>

java.lang.Object
  extended by org.openide.util.Lookup.Item<T>
      extended by org.openide.util.lookup.AbstractLookup.Pair<T>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InstanceContent.ConvertingItem, InstanceContent.SimpleItem
Enclosing class:
AbstractLookup

public abstract static class AbstractLookup.Pair<T>
extends Lookup.Item<T>
implements java.io.Serializable

Extension to the default lookup item that offers additional information for the data structures use in AbstractLookup

See Also:
Serialized Form

Constructor Summary
protected AbstractLookup.Pair()
          For use by subclasses.
 
Method Summary
protected abstract  boolean creatorOf(java.lang.Object obj)
          Method that can test whether an instance of a class has been created by this item.
(package private)  int getIndex()
           
protected abstract  boolean instanceOf(java.lang.Class<?> c)
          Tests whether this item can produce object of class c.
(package private)  void setIndex(AbstractLookup.Storage<?> tree, int x)
           
 
Methods inherited from class org.openide.util.Lookup.Item
getDisplayName, getId, getInstance, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractLookup.Pair

protected AbstractLookup.Pair()
For use by subclasses.

Method Detail

getIndex

final int getIndex()

setIndex

final void setIndex(AbstractLookup.Storage<?> tree,
                    int x)

instanceOf

protected abstract boolean instanceOf(java.lang.Class<?> c)
Tests whether this item can produce object of class c.


creatorOf

protected abstract boolean creatorOf(java.lang.Object obj)
Method that can test whether an instance of a class has been created by this item.

Parameters:
obj - the instance
Returns:
if the item has already create an instance and it is the same as obj.