biz.c24.io.api.data
Class BitMapIndex

java.lang.Object
  extended by biz.c24.io.api.data.BitMapIndex
All Implemented Interfaces:
C24Cloneable, Cloneable

public class BitMapIndex
extends Object
implements C24Cloneable

Bit map index representation class.

Represents the reference on certain bit within bit map.

Version:
$Revision: 10302 $ $Date: 2008-04-02 14:08:09 -0400 (Wed, 02 Apr 2008) $

Constructor Summary
BitMapIndex(int partNo, int index)
          Constructs the Bit map reference with specified part number and index of bit within it.
 
Method Summary
 Object clone()
          Creates and returns a copy of this object.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 int getIndex()
          Returns the bit index.
 int getPartNo()
          Returns the number of bit map part that is referred by this reference.
 int hashCode()
          Returns a hash code value for this instance.
 boolean isSetIn(List map)
          Checks whether this reference is present in binary representation of specified bit map.
 String toString()
          Returns a string representation of this instance.
 void updateImage(List map)
          Updates the specified binary representation of bit map by this reference.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitMapIndex

public BitMapIndex(int partNo,
                   int index)
Constructs the Bit map reference with specified part number and index of bit within it.

Parameters:
partNo - The referred bit map part nomber (starting from 1).
index - The index of bit in referred bit map part (starting from 0).
Method Detail

getIndex

public int getIndex()
Returns the bit index.

Returns:
The bit index in referred bit map part.

getPartNo

public int getPartNo()
Returns the number of bit map part that is referred by this reference.

Returns:
The bit map part number.

clone

public Object clone()
Creates and returns a copy of this object.

Specified by:
clone in interface C24Cloneable
Overrides:
clone in class Object
Returns:
a clone of this instance.
See Also:
Cloneable

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false - otherwise.
See Also:
hashCode(), Hashtable

hashCode

public int hashCode()
Returns a hash code value for this instance.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
equals(Object), Hashtable

toString

public String toString()
Returns a string representation of this instance.

Overrides:
toString in class Object
Returns:
a string representation of location.

updateImage

public void updateImage(List map)
Updates the specified binary representation of bit map by this reference.

In fact, just sets the referred bit in bit map.

Parameters:
map - The binary representation of bit map needed to update.

isSetIn

public boolean isSetIn(List map)
Checks whether this reference is present in binary representation of specified bit map.

Parameters:
map - The binary representation of bit map agains which checking is performed.
Returns:
true if bit map has the corresponding bit, false - otherwise.


C24 Technologies © 2002-2012: All Rights Reserved.