opennlp.maxent
Interface ModelSetter


public interface ModelSetter

A object to facilitate the resetting of a MaxentModel variable to a new value (model). In general this will be used anonymously, for example, as follows:

     private final ModelReplacementManager replacementManager =
          new ModelReplacementManager(
              new ModelSetter() {
                  public void setModel(MaxentModel m) {
                      model = m;
                  }
              }
          );
     

where "model" would be the actual variable name of the model used by your application which you wish to be able to swap (you might have other models which need their own ModelSetters).

Basically, this is just a clean way of giving a ModelReplacementManager access to a private variable holding the model. Nothing complex here.


Method Summary
 void setModel(MaxentModel m)
          Assign a new MaxentModel value to a MaxentModel variable.
 

Method Detail

setModel

void setModel(MaxentModel m)
Assign a new MaxentModel value to a MaxentModel variable.

Parameters:
m - The new model.


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.