All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.nlp.util.DisabledPreferences Maven / Gradle / Ivy

Go to download

Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.

There is a newer version: 3.9.2
Show newest version
package edu.stanford.nlp.util;

import java.util.prefs.AbstractPreferences;
import java.util.prefs.BackingStoreException;

/**
 * A do-nothing Preferences implementation so that we can avoid the hassles
 * of the JVM Preference implementations.
 * Taken from: http://www.allaboutbalance.com/disableprefs/index.html
 *
 * @author Robert Slifka
 * @version 2003/03/24
 */
public class DisabledPreferences extends AbstractPreferences {

  public DisabledPreferences() {
    super(null, "");
  }

  @Override
  protected void putSpi(String key, String value) {

  }

  @Override
  protected String getSpi(String key) {
    return null;
  }

  @Override
  protected void removeSpi(String key) {

  }

  @Override
  protected void removeNodeSpi() throws BackingStoreException {

  }

  @Override
  protected String[] keysSpi() throws BackingStoreException {
    return new String[0];
  }

  @Override
  protected String[] childrenNamesSpi() throws BackingStoreException {
    return new String[0];
  }

  @Override
  protected AbstractPreferences childSpi(String name) {
    return null;
  }

  @Override
  protected void syncSpi() throws BackingStoreException {

  }

  @Override
  protected void flushSpi() throws BackingStoreException {

  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy