com.atlassian.util.concurrent
Class WeakIterable<E>

java.lang.Object
  extended by com.atlassian.util.concurrent.WeakIterable<E>
All Implemented Interfaces:
java.lang.Iterable<E>

@ThreadSafe
public class WeakIterable<E>
extends java.lang.Object
implements java.lang.Iterable<E>

Simple Iterable that holds weak references to content elements. For convenience there are add(Object) and isEmpty() methods.

Iterators returned by this object maintain a hard reference to the next object. They are otherwise unstable as references may be garbage collected at any time


Constructor Summary
WeakIterable()
           
 
Method Summary
 java.util.Iterator<E> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeakIterable

public WeakIterable()
Method Detail

iterator

public java.util.Iterator<E> iterator()
Specified by:
iterator in interface java.lang.Iterable<E>


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.