github.com/balzaczyy/golucene@v0.0.0-20151210033525-d0be9ee89713/core/util/bits.go (about) 1 package util 2 3 // util/Bits.java 4 5 /** 6 * Interface for Bitset-like structures. 7 * @lucene.experimental 8 */ 9 type Bits interface { 10 /** 11 * Returns the value of the bit with the specified <code>index</code>. 12 * @param index index, should be non-negative and < {@link #length()}. 13 * The result of passing negative or out of bounds values is undefined 14 * by this interface, <b>just don't do it!</b> 15 * @return <code>true</code> if the bit is set, <code>false</code> otherwise. 16 */ 17 At(index int) bool 18 19 // Returns the number of bits in the set 20 Length() int 21 } 22 23 // util/MutableBits.java 24 25 /* Extension of Bits for live documents. */ 26 type MutableBits interface { 27 Bits 28 // Sets the bit specified by index to false. 29 Clear(index int) 30 }