Class Explicit<T>

java.lang.Object
org.elasticsearch.common.Explicit<T>

public class Explicit<T>
extends java.lang.Object
Holds a value that is either: a) set implicitly e.g. through some default value b) set explicitly e.g. from a user selection When merging conflicting configuration settings such as field mapping settings it is preferable to preserve an explicit choice rather than a choice made only made implicitly by defaults.
  • Constructor Summary

    Constructors
    Constructor Description
    Explicit​(T value, boolean explicit)
    Create a value with an indication if this was an explicit choice
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    boolean explicit()  
    int hashCode()  
    T value()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Explicit

      public Explicit​(T value, boolean explicit)
      Create a value with an indication if this was an explicit choice
      Parameters:
      value - a setting value
      explicit - true if the value passed is a conscious decision, false if using some kind of default
  • Method Details

    • value

      public T value()
    • explicit

      public boolean explicit()
      Returns:
      true if the value passed is a conscious decision, false if using some kind of default
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object