IlpNetwork network = // ...
// Create a new IlpFilter instance
IlpFilter filter = new IlpFilter(){
// This method is called for every object in the data source
public boolean accept (Object object){
IlpObject ilpObject = (IlpObject)object;
IlpClass clz = ilpObject.getIlpClass();
// Check if the class == IltNetworkElement
return clz.equals(IltNetworkElement.GetIlpClass());
}
// Set the filter to the network
network.setFilter(filter);
All the objects are refiltered whenever a
new filter is set. If the filter is null (which is the default),
all the objects under the root nodes will be displayed.
To retrieve the active filter, use the method
getFilter.
Note
The filtering takes actually place at the
adapter level.