org.apache.commons.compress.harmony.pack200

## Class BandSet.BandData

- java.lang.Object
- - org.apache.commons.compress.harmony.pack200.BandSet.BandData

- Enclosing class:
    BandSet

      public class BandSet.BandData
      extends Object

  BandData represents information about a band, e.g. largest value etc and is used in the heuristics that calculate whether an alternative Codec could make the encoded band smaller.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BandData(int[] band)` Create a new instance of BandData.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `anyNegatives()` Returns true if any band elements are negative.
    `boolean` | `mainlyPositiveDeltas()` Returns true if the band deltas are mainly positive (heuristic).
    `boolean` | `mainlySmallDeltas()` Returns true if the deltas between adjacent band elements are mainly small (heuristic).
    `int` | `numDistinctValues()` Returns the total number of distinct values found in the band.
    `boolean` | `wellCorrelated()` Returns true if the band is well correlated (i.e.

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

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

- - ### Constructor Detail

    - #### BandData

          public BandData(int[] band)

      Create a new instance of BandData. The band is then analysed.
      Parameters:
        `band` - - the band of integers

  - ### Method Detail

    - #### anyNegatives

          public boolean anyNegatives()

      Returns true if any band elements are negative.
      Returns:
        true if any band elements are negative.

    - #### mainlyPositiveDeltas

          public boolean mainlyPositiveDeltas()

      Returns true if the band deltas are mainly positive (heuristic).
      Returns:
        true if the band deltas are mainly positive (heuristic).

    - #### mainlySmallDeltas

          public boolean mainlySmallDeltas()

      Returns true if the deltas between adjacent band elements are mainly small (heuristic).
      Returns:
        true if the deltas between adjacent band elements are mainly small (heuristic).

    - #### numDistinctValues

          public int numDistinctValues()

      Returns the total number of distinct values found in the band.
      Returns:
        the total number of distinct values found in the band.

    - #### wellCorrelated

          public boolean wellCorrelated()

      Returns true if the band is well correlated (i.e. would be suitable for a delta encoding) (heuristic).
      Returns:
        true if the band is well correlated (i.e. would be suitable for a delta encoding) (heuristic).

Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.