/** The method to add instance to the lookup with. * @param inst instance */ public final void add(Object inst) { addPair(new SimpleItem<Object>(inst)); }
/** Adds a convertible instance into the lookup. The <code>inst</code> * argument is just a key, not the actual value to appear in the lookup. * The value will be created on demand, later when it is really needed * by calling <code>convertor</code> methods. * <p> * This method is useful to delay creation of heavy weight objects. * Instead just register lightweight key and a convertor. * <p> * To remove registered object from lookup use {@link #remove(java.lang.Object, org.openide.util.lookup.InstanceContent.Convertor)} * with the same arguments. * * @param inst instance * @param conv convertor which postponing an instantiation, * if <code>conv==null</code> then the instance is registered directly. */ public final <T,R> void add(T inst, Convertor<T,R> conv) { addPair(new ConvertingItem<T,R>(inst, conv)); }
/** The method to add instance to the lookup with. * @param inst instance * @param conv convertor which postponing an instantiation, * if <code>conv==null</code> then the instance is registered directly. */ public final void add (Object inst, Convertor conv) { addPair(new ConvertingItem(inst, conv)); }
/** The method to add instance to the lookup with. * @param inst instance */ public final void add(Object inst) { addPair(new SimpleItem<Object>(inst)); }
/** The method to add instance to the lookup with. * @param inst instance * @param conv convertor which postponing an instantiation, * if <code>conv==null</code> then the instance is registered directly. */ public final void add (Object inst, Convertor conv) { addPair(new ConvertingItem(inst, conv)); }
/** The method to add instance to the lookup with. * @param inst instance */ public final void add (Object inst) { addPair(new SimpleItem (inst)); }
/** The method to add instance to the lookup with. * @param inst instance */ public final void add(Object inst) { addPair(new SimpleItem<Object>(inst)); }
/** The method to add instance to the lookup with. * @param inst instance * @param conv convertor which postponing an instantiation, * if <code>conv==null</code> then the instance is registered directly. */ public final <T,R> void add(T inst, Convertor<T,R> conv) { addPair(new ConvertingItem<T,R>(inst, conv)); }
/** The method to add instance to the lookup with. * @param inst instance */ public final void add (Object inst) { addPair(new SimpleItem (inst)); }
/** Adds a convertible instance into the lookup. The <code>inst</code> * argument is just a key, not the actual value to appear in the lookup. * The value will be created on demand, later when it is really needed * by calling <code>convertor</code> methods. * <p> * This method is useful to delay creation of heavy weight objects. * Instead just register lightweight key and a convertor. * <p> * To remove registered object from lookup use {@link #remove(java.lang.Object, org.openide.util.lookup.InstanceContent.Convertor)} * with the same arguments. * * @param inst instance * @param conv convertor which postponing an instantiation, * if <code>conv==null</code> then the instance is registered directly. */ public final <T,R> void add(T inst, Convertor<T,R> conv) { addPair(new ConvertingItem<T,R>(inst, conv)); }