org.jpmml.model.visitors.Resettable Maven / Gradle / Ivy
/*
* Copyright (c) 2019 Villu Ruusmann
*/
package org.jpmml.model.visitors;
/**
*
* A marker interface for Visitors that accrue state,
* and therefore should be reset to the initial (empty-) state when applying to multiple PMML elements.
*
*
*
* Visitor visitor = ...;
* Collection<PMMLElement> objects = ...;
* for(PMMLElement object : objects){
* if(visitor instanceof Resettable){
* Resettable resettable = (Resettable)visitor;
* resettable.reset();
* }
* visitor.applyTo(object);
* }
*
*/
public interface Resettable {
void reset();
}