biggests.clustering
Class ClusterTreeNodeComparator

java.lang.Object
  extended by biggests.clustering.ClusterTreeNodeComparator
All Implemented Interfaces:
java.util.Comparator

public class ClusterTreeNodeComparator
extends java.lang.Object
implements java.util.Comparator

Title: Hierarchical Cluster Tree Node Comparator

Description: Implements Comparator interface. Allows comparison operations between two cluster tree nodes.

Copyright: Copyright (C) 2007 Joana Gonçalves This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


Constructor Summary
ClusterTreeNodeComparator()
          Creates a new cluster tree node comparator.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two ClusterTreeNodes, o1 and o2.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this Comparator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterTreeNodeComparator

public ClusterTreeNodeComparator()
Creates a new cluster tree node comparator.

Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two ClusterTreeNodes, o1 and o2. Implements Comparator's compare method. Returns a negative integer, 0 or positive integer if o1 is less than, equal to, or greater than o2.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - Object the first ClusterTreeNode to compare
o2 - Object the second ClusterTreeNode to compare
Returns:
int the result of comparation (negative integer, 0 or postive integer if o1 is less than, equal to, or greater than o2

equals

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

Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare with this Comparator
Returns:
boolean true if obj is equal to this Comparator, false otherwise