|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectVennDrawing.SetLabel
class SetLabel
An object representing a label of a Set region.
This class of objects is used to represent a simple label of a set region toCopyright: Copyright (c) 2008
Company: Bangladesh University of engineering and technology
Field Summary | |
---|---|
(package private) int |
bitCount
Keeps the Number of 1's in the binary representation of the value label. |
(package private) int |
labelValue
The label as an Ineteger Value |
Constructor Summary | |
---|---|
SetLabel(int labelValue)
Constructor for the class. |
Method Summary | |
---|---|
int |
compareTo(SetLabel s)
Used to set the property of the priority queue as to Always dequeue the setLabel having the highest bitCount. |
int |
countBits(int x)
Returns how many 1's in the number Like in '3' it contains 2 "1"s in the binary value. |
int |
getBitCount()
Returns bitCount |
int |
getLabelValue()
Returns labelValue |
java.lang.String |
toString()
Returns the String representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
int labelValue
int bitCount
Constructor Detail |
---|
public SetLabel(int labelValue)
labelValue
- value of the label as Integer.Method Detail |
---|
public int countBits(int x)
x
- the value which's number of 1s in binary representation to be checked.
public int getLabelValue()
public int getBitCount()
public int compareTo(SetLabel s)
compareTo
in interface java.lang.Comparable<SetLabel>
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |