ca.sqlpower.architect.profile
Class ColumnValueCount

java.lang.Object
  extended by ca.sqlpower.architect.profile.ColumnValueCount

public class ColumnValueCount
extends java.lang.Object

A simple class for keeping track of a value, the number of occurrences associated with it, and the percentage of occurences in the table. Instances of this class are used in the "Top N most frequent values" property of a column's profile.


Constructor Summary
ColumnValueCount(java.lang.Object value, int count, double percent)
          Creates a new ColumnValueCount instance that associates the given value with the given count.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this ColumnValueCount to the other object based on the value, the count, and the percent.
 int getCount()
           
 double getPercent()
           
 java.lang.Object getValue()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnValueCount

public ColumnValueCount(java.lang.Object value,
                        int count,
                        double percent)
Creates a new ColumnValueCount instance that associates the given value with the given count. Instances of this class are meant to be immtuable, so if the give value object is mutable, you must not modify it.

Parameters:
value - The value to associate the count with. Null is allowed.
count - The number of occurrences of value in the column being profiled.
percent - The percentage of occurrences in the table.
Method Detail

getCount

public int getCount()

getValue

public java.lang.Object getValue()

getPercent

public double getPercent()

equals

public boolean equals(java.lang.Object obj)
Compares this ColumnValueCount to the other object based on the value, the count, and the percent.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca