Class BandInfo

java.lang.Object
ucar.unidata.data.imagery.BandInfo

public class BandInfo extends Object
Class for holding Band information
Version:
$Revision: 1.5 $
Author:
IDV Development Team
  • Constructor Details

    • BandInfo

      public BandInfo()
      Default constructor
    • BandInfo

      public BandInfo(int sensor, int band)
      Create a new BandInfo
      Parameters:
      sensor - satellite sensor number
      band - band number
    • BandInfo

      public BandInfo(int sensor, int band, String description)
      Create a new BandInfo
      Parameters:
      sensor - satellite sensor number
      band - band number
      description - description of band
    • BandInfo

      public BandInfo(int sensor, int band, String description, List units)
      Create a new BandInfo
      Parameters:
      sensor - satellite sensor number
      band - band number
      description - description of band
      units - available calibration units
    • BandInfo

      public BandInfo(BandInfo that)
      Copy constructor
      Parameters:
      that - other BandInfo
  • Method Details

    • setBandNumber

      public void setBandNumber(int band)
      Set the band number for this BandInfo
      Parameters:
      band - band number
    • getBandNumber

      public int getBandNumber()
      Get the band number for this BandInfo
      Returns:
      band number
    • setBandDescription

      public void setBandDescription(String description)
      Set the band description for this BandInfo
      Parameters:
      description - band description
    • getBandDescription

      public String getBandDescription()
      Get the description for the band
      Returns:
      band description
    • setSensor

      public void setSensor(int sensor)
      Set the satellite sensor number for this BandInfo
      Parameters:
      sensor - sensor number
    • getSensor

      public int getSensor()
      Get the satellite sensor number for this BandInfo
      Returns:
      the satellite sensor number for this BandInfo
    • setCalibrationUnits

      public void setCalibrationUnits(List units)
      Set the calibration units for this BandInfo
      Parameters:
      units - list of calibration units
    • getCalibrationUnits

      public List getCalibrationUnits()
      Cet the calibration units for this BandInfo
      Returns:
      the calibration units, may be a list of Strings or
    • setPreferredUnit

      public void setPreferredUnit(String unit)
      Set the preferred calibration unit for this BandInfo
      Parameters:
      unit - unit id
    • getPreferredUnit

      public String getPreferredUnit()
      Cet the preferred calibration units for this BandInfo
      Returns:
      the preferred calibration units
    • toString

      public String toString()
      Get a String Representation of this object
      Overrides:
      toString in class Object
      Returns:
      a String Representation of this object
    • equals

      public boolean equals(Object o)
      Check for equality
      Overrides:
      equals in class Object
      Parameters:
      o - object to check
      Returns:
      true if object is equal to this
    • hashCode

      public int hashCode()
      Get the Hashcode for this object.
      Overrides:
      hashCode in class Object
      Returns:
      hashcode
    • findIndexByNumber

      public static int findIndexByNumber(int band, List<BandInfo> bandinfos)
      Find the index in the list of the first band with the band number.
      Parameters:
      band - band number
      bandinfos - list of BandInfos
      Returns:
      the index in the list or -1
    • findIndexByName

      public static int findIndexByName(String desc, List<BandInfo> bandinfos)
      Find the index in the list of the first band with the band description.
      Parameters:
      desc - band name
      bandinfos - list of BandInfos
      Returns:
      the index in the list or -1