Class LayersIterator

java.lang.Object
org.gvsig.fmap.mapcontext.layers.LayersIterator
All Implemented Interfaces:
Iterator

public class LayersIterator extends Object implements Iterator
Interator for iterate in a Layers tree

Extend this class to create an expecific layer iterator and override the method evaluate for check if a layer will be in the iteration list.

Author:
jmvivo
  • Constructor Details

    • LayersIterator

      public LayersIterator()
    • LayersIterator

      public LayersIterator(FLayer layer)
  • Method Details

    • appendLayer

      protected void appendLayer(FLayer layer)
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator
    • next

      public Object next()
      Specified by:
      next in interface Iterator
    • nextLayer

      public FLayer nextLayer()
      Returns the next layer in the iteration.
      Returns:
      the next layer in the iteration.
      Throws:
      NoSuchElementException - iteration has no more elements.
      See Also:
    • evaluate

      public boolean evaluate(FLayer layer)
      Called before add a layer to the iteration list.
      Parameters:
      layer - the layer to check
      Returns:
      true if the layer will be in the iteration list