anatomy
Class AttValueCount

java.lang.Object
  extended by anatomy.AttValueCount
All Implemented Interfaces:
java.lang.Comparable

public class AttValueCount
extends java.lang.Object
implements java.lang.Comparable

This class manages the counts of sensitive attribute values. Associated with each object is a double attribute value and the count of tuples in the dataset that have that value.


Field Summary
private  int count
          Number of associated tuples
private  double value
          Attribute value
 
Constructor Summary
AttValueCount(double value, int count)
          Class constructor
 
Method Summary
 int compareTo(java.lang.Object o)
          Used for sorting AttValueCounts in DESCENDING order
 boolean decrement()
          Decrement the count for this attribute value
 int getCount()
          Getter for the tuple count
 double getValue()
          Getter for the attribute value
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private double value
Attribute value


count

private int count
Number of associated tuples

Constructor Detail

AttValueCount

public AttValueCount(double value,
                     int count)
Class constructor

Parameters:
value - attribute value
count - number of associated tuples
Method Detail

decrement

public boolean decrement()
Decrement the count for this attribute value

Returns:
true if the count is larger than 0, false otherwise

compareTo

public int compareTo(java.lang.Object o)
Used for sorting AttValueCounts in DESCENDING order

Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getValue

public double getValue()
Getter for the attribute value

Returns:
the attribute value

getCount

public int getCount()
Getter for the tuple count

Returns:
count of tuples associated with the value