Class NodeMap<CDM_T extends CDMNode,​DAP_T extends DapNode>


  • public class NodeMap<CDM_T extends CDMNode,​DAP_T extends DapNode>
    extends Object
    Provide a bi-directional 1-1 map between DapNode instances and CDMNode instances.

    There is a complication. Currently, the hashCode() in ucar.nc2.Variable (and other classes) is unstable when objects are being incrementally constructed. So until and unless that is changed, it is necessary to provide a way to map CDMNode <-> DapNode that is independent of e.g Variable.hashCode(); We do this by overriding hashCode() to use Object.hashCode() explicitly.

    • Constructor Detail

      • NodeMap

        public NodeMap()
    • Method Detail

      • containsKey

        public boolean containsKey​(CDM_T node)
      • containsKey

        public boolean containsKey​(DAP_T node)
      • put

        public void put​(CDM_T cdm,
                        DAP_T dap)
        Given a CDM_T <-> DAP_T pair, insert into the maps
        Parameters:
        cdm -
        dap -
      • remove

        public void remove​(CDM_T cdm,
                           DAP_T dap)
        Given a DAP_T <-> CDM_T pair, remove from the maps
        Parameters:
        cdm -
        dap -