Package adql.search
Interface IReplaceHandler
-
- All Superinterfaces:
ISearchHandler
,java.lang.Iterable<ADQLObject>
- All Known Implementing Classes:
RemoveHandler
,SimpleReplaceHandler
public interface IReplaceHandler extends ISearchHandler
Defines an interface for any kind of search/replace handler.
A replace handler is supposed to replace ADQL objects matching a given condition by another ADQL object (which may be generated on the fly if needed). In some ADQL objects (i.e.
ADQLList
), it is also possible to remove objects. In this case, the replacement object must be NULL.A simple implementation of this interface already exists:
SimpleReplaceHandler
.- Version:
- 06/2011
- Author:
- Grégory Mantelet (CDS)
- See Also:
SimpleReplaceHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getNbReplacement()
Gets the number of matched objects which have been successfully replaced.void
searchAndReplace(ADQLObject startObj)
Searches all matching ADQL objects from the given ADQL object (included) and replaces them by their corresponding ADQL object.-
Methods inherited from interface adql.search.ISearchHandler
getNbMatch, iterator, search
-
-
-
-
Method Detail
-
searchAndReplace
void searchAndReplace(ADQLObject startObj)
Searches all matching ADQL objects from the given ADQL object (included) and replaces them by their corresponding ADQL object.- Parameters:
startObj
- The ADQL object from which the search must start.
-
getNbReplacement
int getNbReplacement()
Gets the number of matched objects which have been successfully replaced.- Returns:
- The number of replaced objects.
-
-