Package org.apache.lucene.search

# Class LRUQueryCache.CacheAndCount

java.lang.Object
org.apache.lucene.search.LRUQueryCache.CacheAndCount

All Implemented Interfaces:
  `Accountable`

Enclosing class:
  `LRUQueryCache`

protected static class LRUQueryCache.CacheAndCount extends Object implements Accountable
Cache of doc ids with a count.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final LRUQueryCache.CacheAndCount`
`EMPTY`

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

`NULL_ACCOUNTABLE`

## Constructor Summary

Constructors
Constructor
Description
`CacheAndCount(DocIdSet cache, int count)`

## Method Summary

Modifier and Type
Method
Description
`int`
`count()`
`DocIdSetIterator`
`iterator()`
`long`
`ramBytesUsed()`
Return the memory usage of this object in bytes.

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

`getChildResources`

## Field Details

### EMPTY

protected static final LRUQueryCache.CacheAndCount EMPTY

## Constructor Details

### CacheAndCount

public CacheAndCount(DocIdSet cache, int count)

## Method Details

### iterator

public DocIdSetIterator iterator() throws IOException

Throws:
  `IOException`

### count

public int count()

### ramBytesUsed

public long ramBytesUsed()
Description copied from interface: `Accountable`
Return the memory usage of this object in bytes. Negative values are illegal.

Specified by:
  `ramBytesUsed` in interface `Accountable`