com.hammurapi.extract

## Class CompiledExtractorBase<T,V,C>

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

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

      public abstract class CompiledExtractorBase<T,V,C>
      extends AbstractExtractor<T,V,C>
      implements Mappable<T,V,C>

  Base class for compiled java extractors/predicates.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int[]` | `map`

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

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

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CompiledExtractorBase(int[] map, boolean contextDependent, int... parameterIndices)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ComparisonResult` | `compareTo(Extractor<T,V,C> other)` Basic comparisons with True and False.
    `protected abstract List<Object>` | `getIdentity()`
    `Extractor<T,V,C>` | `map(int[] map)` Applies mapping to extractor.
    `protected int` | `mapArg(int idx)` Maps argument indices for invocation.
    `protected abstract CompiledExtractorBase<T,V,C>` | `newInstance(int[] map)`
    `Set<Integer>` | `parameterIndices()`

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

      `isContextDependent`

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

      `createCacheEntry, equals, extract, extractInternal, getCost`

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

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

- - ### Field Detail

    - #### map

          protected int[] map

  - ### Constructor Detail

    - #### CompiledExtractorBase

          protected CompiledExtractorBase(int[] map,
                               boolean contextDependent,
                               int... parameterIndices)

  - ### Method Detail

    - #### newInstance

          protected abstract CompiledExtractorBase<T,V,C> newInstance(int[] map)

    - #### getIdentity

          protected abstract List<Object> getIdentity()

    - #### mapArg

          protected int mapArg(int idx)

      Maps argument indices for invocation.
      Parameters:
        `idx` -
      Returns:

    - #### map

          public Extractor<T,V,C> map(int[] map)

      Description copied from interface: `Mappable`
      Applies mapping to extractor.
      Specified by:
        `map` in interface `Mappable<T,V,C>`
      Returns:
        Extractor with changed mapping or null if mapping is not possible.

    - #### 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.

    - #### parameterIndices

          public Set<Integer> parameterIndices()

      Specified by:
        `parameterIndices` in interface `Extractor<T,V,C>`
      Overrides:
        `parameterIndices` in class `AbstractExtractor<T,V,C>`
      Returns:
        Indexes of objects which this extractor uses for computations.