Tabnine Logo
JobSettings.remove
Code IndexAdd Tabnine to your IDE (free)

How to use
remove
method
in
uk.gov.dstl.baleen.uima.JobSettings

Best Java code snippets using uk.gov.dstl.baleen.uima.JobSettings.remove (Showing top 3 results out of 315)

origin: dstl/baleen

@Test
public void testRemove() {
 settings.remove("key");
 settings.set("key", "value");
 assertEquals("value", settings.get("key").get());
 settings.remove("key");
 assertFalse(settings.get("key").isPresent());
}
origin: dstl/baleen

/**
 * Sets the value of a key.
 *
 * @param key the key
 * @param value the value (if null the key will be deleted)
 */
public void set(final String key, final String value) {
 // Null = delete
 if (value == null) {
  remove(key);
  return;
 }
 // Do we have any existing metadata this this key?
 final Optional<Metadata> mdFound = metadata.findMetadata(key);
 // If so, update or else create
 Metadata md;
 if (mdFound.isPresent()) {
  md = mdFound.get();
  md.setValue(value);
 } else {
  md = new Metadata(jCas);
  md.setBegin(0);
  md.setEnd(1);
  md.setKey(key);
  md.setValue(value);
 }
 md.addToIndexes();
}
origin: uk.gov.dstl.baleen/baleen-uima

/**
 * Sets the value of a key.
 *
 * @param key the key
 * @param value the value (if null the key will be deleted)
 */
public void set(final String key, final String value) {
 // Null = delete
 if (value == null) {
  remove(key);
  return;
 }
 // Do we have any existing metadata this this key?
 final Optional<Metadata> mdFound = metadata.findMetadata(key);
 // If so, update or else create
 Metadata md;
 if (mdFound.isPresent()) {
  md = mdFound.get();
  md.setValue(value);
 } else {
  md = new Metadata(jCas);
  md.setBegin(0);
  md.setEnd(1);
  md.setKey(key);
  md.setValue(value);
 }
 md.addToIndexes();
}
uk.gov.dstl.baleen.uimaJobSettingsremove

Javadoc

Removes the data at the key

Popular methods of JobSettings

  • <init>
    Instantiates a new job settings.
  • set
    Sets the value of a key.
  • get
    Gets the value at a key.

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JTable (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now