Examples of WeakObject


Examples of org.eclipse.php.internal.core.util.WeakObject

   * @param o
   *            element whose presence in this collection is to be tested.
   * @return <tt>true</tt> if this collection contains the specified element
   */
  public boolean contains(Object o) {
    return refrencedCollection.contains(new WeakObject(o));
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.util.WeakObject

    }
    return a;
  }

  public boolean add(Object o) {
    WeakObject weakObject = new WeakObject(o);
    return refrencedCollection.add(weakObject);
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.util.WeakObject

    WeakObject weakObject = new WeakObject(o);
    return refrencedCollection.add(weakObject);
  }

  public boolean remove(Object o) {
    WeakObject weakObject = new WeakObject(o);
    return refrencedCollection.remove(weakObject);
  }
View Full Code Here

Examples of org.jboss.util.WeakObject

   /**
    * Maintain the elements in the set.  Removes objects from the set that
    * have been reclaimed due to GC.
    */
   protected final void maintain() {
      WeakObject weak;
      while ((weak = (WeakObject)queue.poll()) != null) {
         set.remove(weak);
      }
   }
View Full Code Here

Examples of org.jboss.util.WeakObject

            /** The next available object. */
            Object next = null;

            public boolean hasNext() {
               while (iter.hasNext()) {
                  WeakObject weak = (WeakObject)iter.next();
                  Object obj = null;
                  if (weak != null && (obj = weak.get()) == null) {
                     // object has been reclaimed by the GC
                     continue;
                  }

                  next = obj;
View Full Code Here

Examples of org.jboss.util.WeakObject

   /**
    * Maintain the elements in the set.  Removes objects from the set that
    * have been reclaimed due to GC.
    */
   protected final void maintain() {
      WeakObject weak;
      while ((weak = (WeakObject)queue.poll()) != null) {
         set.remove(weak);
      }
   }
View Full Code Here

Examples of org.jboss.util.WeakObject

            public boolean hasNext() {
               if (next != UNKNOWN) {
                  return true;
               }
               while (iter.hasNext()) {
                  WeakObject weak = (WeakObject)iter.next();
                  Object obj = null;
                  if (weak != null && (obj = weak.get()) == null) {
                     // object has been reclaimed by the GC
                     continue;
                  }
                  next = obj;
                  return true;
View Full Code Here

Examples of org.jboss.util.WeakObject

   /**
    * Maintain the elements in the set.  Removes objects from the set that
    * have been reclaimed due to GC.
    */
   protected final void maintain() {
      WeakObject weak;
      while ((weak = (WeakObject)queue.poll()) != null) {
         set.remove(weak);
      }
   }
View Full Code Here

Examples of org.jboss.util.WeakObject

            public boolean hasNext() {
               if (next != UNKNOWN) {
                  return true;
               }
               while (iter.hasNext()) {
                  WeakObject weak = (WeakObject)iter.next();
                  Object obj = null;
                  if (weak != null && (obj = weak.get()) == null) {
                     // object has been reclaimed by the GC
                     continue;
                  }
                  next = obj;
                  return true;
View Full Code Here

Examples of org.jboss.util.WeakObject

   /**
    * Maintain the elements in the set.  Removes objects from the set that
    * have been reclaimed due to GC.
    */
   protected final void maintain() {
      WeakObject weak;
      while ((weak = (WeakObject)queue.poll()) != null) {
         set.remove(weak);
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.