Bits.MatchAllBits (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util, interface: Bits, class: MatchAllBits

Package org.apache.lucene.util

# Class Bits.MatchAllBits

java.lang.Object
org.apache.lucene.util.Bits.MatchAllBits

All Implemented Interfaces:
  `Bits`

Enclosing interface:
  `Bits`

public static class Bits.MatchAllBits extends Object implements Bits
Bits impl of the specified length with all bits set.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits

  `Bits.MatchAllBits, Bits.MatchNoBits`

- ## Field Summary

  ### Fields inherited from interface org.apache.lucene.util.Bits

  `EMPTY_ARRAY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MatchAllBits(int len)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `get(int index)`
  Returns the value of the bit with the specified `index`.
  `int`
  `length()`
  Returns the number of bits in this set

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

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

  ### Methods inherited from interface org.apache.lucene.util.Bits

  `applyMask`

- ## Constructor Details

  - ### MatchAllBits

    public MatchAllBits(int len)

- ## Method Details

  - ### get

    public boolean get(int index)
    Description copied from interface: `Bits`
    Returns the value of the bit with the specified `index`.
    Specified by:
      `get` in interface `Bits`
    Parameters:
      `index` - index, should be non-negative and < `Bits.length()`. The result of passing negative or out of bounds values is undefined by this interface, just don't do it!
    Returns:
      `true` if the bit is set, `false` otherwise.

  - ### length

    public int length()
    Description copied from interface: `Bits`
    Returns the number of bits in this set
    Specified by:
      `length` in interface `Bits`