Class GvmNullKeyer<K>

  • Type Parameters:
    K - the key type
    All Implemented Interfaces:
    GvmKeyer<K>

    public class GvmNullKeyer<K>
    extends Object
    implements GvmKeyer<K>
    Simply discards all keys.
    Author:
    Tom Gibara
    • Constructor Detail

      • GvmNullKeyer

        public GvmNullKeyer()
    • Method Detail

      • addKey

        public K addKey​(GvmCluster<?,​K> cluster,
                        K key)
        Description copied from interface: GvmKeyer
        Called when a key is being added to a cluster.
        Specified by:
        addKey in interface GvmKeyer<K>
        Parameters:
        cluster - a cluster
        key - the key for a newly clustered coordinate
        Returns:
        the key to be assigned to the new cluster, may be null
      • mergeKeys

        public K mergeKeys​(GvmCluster<?,​K> c1,
                           GvmCluster<?,​K> c2)
        Description copied from interface: GvmKeyer
        Called when two clusters are being merged. One key needs to be chosen/synthesized from those of the clusters being merged.
        Specified by:
        mergeKeys in interface GvmKeyer<K>
        Parameters:
        c1 - the cluster with the greater mass
        c2 - the cluster with the lesser mass
        Returns:
        a key for the cluster that combines those of c1 and c2, may be null