Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class FilterEnumerator

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.util.FilterEnumerator

All Implemented Interfaces:
  java.util.Enumeration, java.util.Iterator

    public class FilterEnumerator

extends Base
implements java.util.Enumeration, java.util.Iterator

Provide a generic implementation of an enumerator which can enumerate items based on an inclusion test.

Author:
  cp 1997.09.05, cp 1998.08.07

Field Summary
`protected boolean` | `m_fNext` Is there a next item which passed the test?
`protected boolean` | `m_fPrev` Is there a previous item which passed the test and can be removed?
`protected java.util.Iterator` | `m_iter` Objects to filter/enumerate.
`protected java.lang.Object` | `m_oNext` The next item which passed the test.
`protected Filter` | `m_test` Test to perform on each item.

Constructor Summary
`FilterEnumerator(java.util.Enumeration enmr, Filter test)` Construct the Filter enumerator based on an Enumeration.
`FilterEnumerator(java.util.Iterator iter, Filter test)` Construct the Filter enumerator based on an Iterator.
`FilterEnumerator(java.lang.Object[] aoItem, Filter test)` Construct the Filter enumerator based on an array of objects.

Method Summary
`boolean` | `hasMoreElements()` Tests if this enumeration contains more elements.
`boolean` | `hasNext()` Tests if this Iterator contains more elements.
`java.lang.Object` | `next()` Returns the next element of this Iterator.
`java.lang.Object` | `nextElement()` Get the next element in the enumeration.
`void` | `remove()` Remove the last-returned element that was returned by the Iterator.

Field Detail

### m_iter

    protected java.util.Iterator m_iter

  Objects to filter/enumerate.

### m_test

    protected Filter m_test

  Test to perform on each item.

### m_fNext

    protected boolean m_fNext

  Is there a next item which passed the test?

### m_fPrev

    protected boolean m_fPrev

  Is there a previous item which passed the test and can be removed?

### m_oNext

    protected java.lang.Object m_oNext

  The next item which passed the test.

Constructor Detail

### FilterEnumerator

    public FilterEnumerator(java.util.Enumeration enmr,
                            Filter test)

  Construct the Filter enumerator based on an Enumeration.

  Parameters:
    `enmr` - Enumeration of objects to filter
    `test` - an inclusion test

### FilterEnumerator

    public FilterEnumerator(java.util.Iterator iter,
                            Filter test)

  Construct the Filter enumerator based on an Iterator.

  Parameters:
    `iter` - Iterator of objects to filter
    `test` - an inclusion test

### FilterEnumerator

    public FilterEnumerator(java.lang.Object[] aoItem,
                            Filter test)

  Construct the Filter enumerator based on an array of objects.

  Parameters:
    `aoItem` - array of objects to enumerate
    `test` - an inclusion test

Method Detail

### hasMoreElements

    public boolean hasMoreElements()

  Tests if this enumeration contains more elements.

  Specified by:
    `hasMoreElements` in interface `java.util.Enumeration`
  Returns:
    false if the enumeration has been exhausted

### nextElement

    public java.lang.Object nextElement()

  Get the next element in the enumeration.

  Specified by:
    `nextElement` in interface `java.util.Enumeration`
  Returns:
    the next element of this enumeration

### hasNext

    public boolean hasNext()

  Tests if this Iterator contains more elements.

  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Returns:
    true if the Iterator contains more elements, false otherwise

### next

    public java.lang.Object next()

  Returns the next element of this Iterator.

  Specified by:
    `next` in interface `java.util.Iterator`
  Returns:
    the next element in the Iterator

### remove

    public void remove()

  Remove the last-returned element that was returned by the Iterator.

  Specified by:
    `remove` in interface `java.util.Iterator`

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.