com.hammurapi.extract

## Class Constant<T,V,C>

- java.lang.Object
- - com.hammurapi.extract.ExtractorBase<T,V,C>
  - - com.hammurapi.extract.Constant<T,V,C>

- Type Parameters:
    `V` -
    `C` -
  All Implemented Interfaces:
    Extractor<T,V,C>

      public class Constant<T,V,C>
      extends ExtractorBase<T,V,C>

  Constants don't extract any data from sources, but may extract data from context.

- - ### Field Summary

    - ### Fields inherited from class com.hammurapi.extract.ExtractorBase

      `cost, costUnit, initialCost, invocations, nanos, totalCost`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Constant()`
    `` | `Constant(V value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ComparisonResult` | `compareTo(Extractor<T,V,C> other)` Basic comparisons with True and False.
    `boolean` | `equals(Object obj)`
    `protected V` | `extractInternal(C context, Map<C,Map<Extractor<T,? super V,C>,? super V>> cache, T... obj)`
    `V` | `getValue()`
    `int` | `hashCode()`
    `boolean` | `isContextDependent()`
    `Set<Integer>` | `parameterIndices()`
    `String` | `toString()`

    - ### Methods inherited from class com.hammurapi.extract.ExtractorBase

      `createCacheEntry, extract, getCost`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Constant

          protected Constant()

    - #### Constant

          public Constant(V value)

  - ### Method Detail

    - #### getValue

          public V getValue()

    - #### extractInternal

          protected V extractInternal(C context,
                          Map<C,Map<Extractor<T,? super V,C>,? super V>> cache,
                          T... obj)

      Specified by:
        `extractInternal` in class `ExtractorBase<T,V,C>`

    - #### parameterIndices

          public Set<Integer> parameterIndices()

      Returns:
        Indexes of objects which this extractor uses for computations.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `ExtractorBase<T,V,C>`

    - #### isContextDependent

          public boolean isContextDependent()

      Returns:
        True if extractor uses context for extraction. False if only object(s) are used.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### compareTo

          public ComparisonResult compareTo(Extractor<T,V,C> other)

      Description copied from class: `ExtractorBase`
      Basic comparisons with True and False.
      Specified by:
        `compareTo` in interface `Extractor<T,V,C>`
      Overrides:
        `compareTo` in class `ExtractorBase<T,V,C>`
      Parameters:
        `other` - Other extractor
      Returns:
        Comparison result.