ilog.views
Class IlvFilteredGraphicEnumeration

java.lang.Object
  extended by ilog.views.IlvFilteredGraphicEnumeration
All Implemented Interfaces:
IlvGraphicEnumeration

public class IlvFilteredGraphicEnumeration
extends Object
implements IlvGraphicEnumeration

A class used to enumerate filtered graphic objects (IlvGraphic). This class allows you to browse only the elements of an IlvGraphicEnumeration which respect some conditions. You should implement these conditions in your implementation of the interface IlvGraphicFilter.

Since:
JViews2.0
See Also:
IlvGraphicFilter, IlvGraphicEnumeration

Constructor Summary
IlvFilteredGraphicEnumeration(IlvGraphicEnumeration e, IlvGraphicFilter filter)
          Creates a new IlvFilteredGraphicEnumeration.
 
Method Summary
 IlvGraphicFilter getFilter()
          Returns the filter to be applied to the initial enumeration.
 boolean hasMoreElements()
          Returns true if the enumeration contains more elements respecting the filtering condition, and false otherwise.
 IlvGraphic nextElement()
          Returns the next graphic object of the enumeration respecting the filtering condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvFilteredGraphicEnumeration

public IlvFilteredGraphicEnumeration(IlvGraphicEnumeration e,
                                     IlvGraphicFilter filter)
Creates a new IlvFilteredGraphicEnumeration.

Parameters:
e - the graphic enumeration you want to be filtered
filter - the graphic filter to be used for filtering the graphic objects
Method Detail

getFilter

public IlvGraphicFilter getFilter()
Returns the filter to be applied to the initial enumeration.


hasMoreElements

public boolean hasMoreElements()
Returns true if the enumeration contains more elements respecting the filtering condition, and false otherwise. To know if an element respects the filtering condition, this method calls the method IlvGraphicFilter.accept(IlvGraphic) on the filter instance.

Specified by:
hasMoreElements in interface IlvGraphicEnumeration
See Also:
IlvGraphicFilter.accept(ilog.views.IlvGraphic)

nextElement

public IlvGraphic nextElement()
Returns the next graphic object of the enumeration respecting the filtering condition. Calling this method will enumerate successive elements.

Specified by:
nextElement in interface IlvGraphicEnumeration
Throws:
NoSuchElementException - if there are no more such elements
See Also:
hasMoreElements()


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.