DefaultFamily and comparing RealTypes

Hi Bill and others,

I've been comparing RealTypes a bit, and it has just stopped working.
I'm assuming that it's ok to use == on RealTypes as they seem to be
a global sort of thing.  I am interested in testing the equality
of the name and units etc, so I'm not using RealType.equals().

The problem is that the comparison's behaviour changes after
I create a DefaultFamily.

The code below shows this (at least for me!), remove the commented
out line to change what it prints.

Is my assumption bad, or is DefaultFamily doing something bad?

thanks,

Andrew.

--

import visad.*;
import visad.data.DefaultFamily;


public class T
{
        public static void main(String[] args)
        {
                System.out.println("Hello");

//DefaultFamily defaultFamily = new DefaultFamily("default");

                RealType lat = RealType.Latitude;
                RealType lat2 = RealType.getRealType("Latitude");

                System.out.println("( " +
                        lat + " = " +
                        lat2 + " )= " +
                        (lat == lat2));
        }
}


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: