org.apache.derby.catalog.types
Class StatisticsImpl

java.lang.Object
  extended byorg.apache.derby.catalog.types.StatisticsImpl
All Implemented Interfaces:
java.io.Externalizable, Formatable, java.io.Serializable, Statistics, TypedFormat

public class StatisticsImpl
extends java.lang.Object
implements Statistics, Formatable

See Also:
Serialized Form

Field Summary
private  long numRows
           
private  long numUnique
           
 
Constructor Summary
StatisticsImpl()
          Zero argument constructor for Formatable Interface
StatisticsImpl(long numRows, long numUnique)
          Constructor for StatisticsImpl.
 
Method Summary
 int getTypeFormatId()
          Get a universally unique identifier for the type of this object.
 void readExternal(java.io.ObjectInput in)
           
 double selectivity(java.lang.Object[] predicates)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
          Write this object to a stream of stored objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numRows

private long numRows

numUnique

private long numUnique
Constructor Detail

StatisticsImpl

public StatisticsImpl(long numRows,
                      long numUnique)
Constructor for StatisticsImpl.

Parameters:
numRows - number of rows in the conglomerate for which this statistic is being created.
numUnique - number of unique values in the key for which this statistic is being created.

StatisticsImpl

public StatisticsImpl()
Zero argument constructor for Formatable Interface

Method Detail

selectivity

public double selectivity(java.lang.Object[] predicates)
Specified by:
selectivity in interface Statistics
Returns:
the selectivity for a set of predicates.
See Also:
Statistics.selectivity(java.lang.Object[])

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Externalizable.readExternal(java.io.ObjectInput)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write this object to a stream of stored objects.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - write bytes here.
Throws:
java.io.IOException - thrown on error

getTypeFormatId

public int getTypeFormatId()
Description copied from interface: TypedFormat
Get a universally unique identifier for the type of this object.

Specified by:
getTypeFormatId in interface TypedFormat
Returns:
the format id which corresponds to this class.

toString

public java.lang.String toString()
See Also:
Object.toString()

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.