"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/map/BitMap.java" between
hsqldb-2.6.0.zip and hsqldb-2.6.1.zip

About: HSQLDB (HyperSQL DataBase) is a SQL relational database engine written in Java. It supports nearly full ANSI-92 SQL (BNF format) and full core SQL:2008.

BitMap.java  (hsqldb-2.6.0):BitMap.java  (hsqldb-2.6.1)
skipping to change at line 35 skipping to change at line 35
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package org.hsqldb.map; package org.hsqldb.map;
import java.util.Arrays; import java.util.Arrays;
import org.hsqldb.lib.ArrayUtil;
/** /**
* Implementation of a bit map of any size. The map is initialised with * Implementation of a bit map of any size. The map is initialised with
* the given size with no bits set. The map is fixed length depending on * the given size with no bits set. The map is fixed length depending on
* the constructor argument. * the constructor argument.
* *
* Static methods to manipulate int, byte and byte[] values as bit maps. * Static methods to manipulate int, byte and byte[] values as bit maps.
* *
* @author Fred Toussi (fredt@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net)
* @version 2.4.1 * @version 2.6.1
* @since 1.8.0 * @since 1.8.0
*/ */
public class BitMap { public class BitMap {
private boolean canChangeSize; private boolean canChangeSize;
private int initialSize; private int initialSize;
private int[] map; private int[] map;
private int limitPos; private int limitPos;
public BitMap(int size, boolean extend) { public BitMap(int size, boolean extend) {
skipping to change at line 79 skipping to change at line 77
public BitMap(int[] map) { public BitMap(int[] map) {
this.map = map; this.map = map;
initialSize = map.length * Integer.SIZE; initialSize = map.length * Integer.SIZE;
limitPos = initialSize; limitPos = initialSize;
canChangeSize = false; canChangeSize = false;
} }
public BitMap duplicate() { public BitMap duplicate() {
BitMap newMap = new BitMap((int[]) ArrayUtil.duplicateArray(this.map)); BitMap newMap = new BitMap(Arrays.copyOf(this.map, this.map.length));
newMap.canChangeSize = this.canChangeSize; newMap.canChangeSize = this.canChangeSize;
newMap.initialSize = this.initialSize; newMap.initialSize = this.initialSize;
newMap.limitPos = this.limitPos; newMap.limitPos = this.limitPos;
return newMap; return newMap;
} }
public int size() { public int size() {
return limitPos; return limitPos;
 End of changes. 3 change blocks. 
4 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)