Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javatest
Interface TestResultTable.TreeIterator

All Superinterfaces:
  java.util.Enumeration, java.util.Iterator

Enclosing class:
  TestResultTable

    public static interface TestResultTable.TreeIterator

extends java.util.Enumeration, java.util.Iterator

Defines an iterator/enumerator interface for retrieving tests out of the tree. This is a read-only interface, so `remove()` is not supported.

Method Summary
`TestFilter[]` | `getFilters()` Find out what the effective filters are.
`java.util.Hashtable` | `getFilterStats()` Find out which filters rejected which tests.
`java.lang.String[]` | `getInitialURLs()` Find out what the effective initial URLs for this enumerator are.
`int` | `getRejectCount()` Find out how many tests were rejected by filters while doing iteration.
`int[]` | `getResultStats()` Find out which states the test which have been enumerated already were in.
`boolean` | `hasMoreElements()`
`boolean` | `hasNext()`
`boolean` | `isPending(TestResult node)` Will the iterator be returning the given node later.
`java.lang.Object` | `next()`
`java.lang.Object` | `nextElement()`
`java.lang.Object` | `peek()` Peek into the future to see which object will be returned next.
`void` | `remove()` Do not call this method.
`void` | `setRecordRejects(boolean state)` Should the rejected tests be tracked.

Method Detail

### hasMoreElements

    boolean hasMoreElements()

  Specified by:
    `hasMoreElements` in interface `java.util.Enumeration`

### nextElement

    java.lang.Object nextElement()

  Specified by:
    `nextElement` in interface `java.util.Enumeration`

### hasNext

    boolean hasNext()

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

### next

    java.lang.Object next()

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

### remove

    void remove()

  Do not call this method.

  Specified by:
    `remove` in interface `java.util.Iterator`
  Throws:
    `java.lang.UnsupportedOperationException` - Not available for this iterator.

### getRejectCount

    int getRejectCount()

  Find out how many tests were rejected by filters while doing iteration. This number will be available despite the setting on setRecordRejects().

  Returns:
    The number of tests found by rejected by the filters. The value will be between zero and max. int.

### setRecordRejects

    void setRecordRejects(boolean state)

  Should the rejected tests be tracked. The default is to not record this info, activating this feature will make `getFilterStats()` return useful info. The setting can be changed at any time, but never resets the statistics. The recorded statistics represent iterator output during this object's lifetime, while this feature was enabled. The setting here does not affect information from `getRejectCount()`

  Parameters:
    `state` - True to activate this feature, false to disable.
  See Also:
    `getFilterStats()`

### getResultStats

    int[] getResultStats()

  Find out which states the test which have been enumerated already were in. The result is valid at any point in time, and represent the stats for the entire selected set of tests when hasMoreElements() is false.

  Returns:
    Indexes refer to those values found in Status
  See Also:
    `Status`

### getFilterStats

    java.util.Hashtable getFilterStats()

  Find out which filters rejected which tests. The data is valid at any point in time; hasNext() does not have to be false. Note that filters are evaluated in the order shown in getFilters() and that the statistics only registered the first filter that rejected the test; there may be additional filters which would also reject any given test.

  The hashtable has keys of TestResults, and values which are TestFilters. Because of CompositeFilters, the set of filters found in the ``values'' is not necessarily equivalent to those given by getFilters().

  Returns:
    Array as described or null if no tests have been rejected yet.
  Since:
    3.0.3

### getFilters

    TestFilter[] getFilters()

  Find out what the effective filters are.

  Returns:
    Null if there are no active filters.

### getInitialURLs

    java.lang.String[] getInitialURLs()

  Find out what the effective initial URLs for this enumerator are. The returned array can be any combination of URLs to individual tests or URLs to directories. Remember these are URLs, so the paths are not platform specific.

  Returns:
    Null if no nodes or tests were found. Any array of the initial URLs otherwise.

### peek

    java.lang.Object peek()

  Peek into the future to see which object will be returned next.

  Returns:
    The next object scheduled to come out of `next()`, or null if `hasNext()` is false.

### isPending

    boolean isPending(TestResult node)

  Will the iterator be returning the given node later. There is no checking to ensure that the parameter is within the iterator's "address space". The comparison is not reference based, but location based, so, will the test at the location indicated by the given test be evaluated for iterator later? This query is done without respect to the filters.

  Parameters:
    `node` - The test result indicating the location in question.
  Returns:
    True if the test in question has not been passed by the iterator and may still be returned. False if the given test will not subsequently be returned by this iterator.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.