ucar.unidata.data.imagery
Class BandInfo

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

public class BandInfo
extends Object

Class for holding Band information

Version:
$Revision: 1.5 $
Author:
IDV Development Team

Constructor Summary
BandInfo()
          Default constructor
BandInfo(BandInfo that)
          Copy constructor
BandInfo(int sensor, int band)
          Create a new BandInfo
BandInfo(int sensor, int band, String description)
          Create a new BandInfo
BandInfo(int sensor, int band, String description, List units)
          Create a new BandInfo
 
Method Summary
 boolean equals(Object o)
          Check for equality
static int findIndexByName(String desc, List<BandInfo> bandinfos)
          Find the index in the list of the first band with the band description.
static int findIndexByNumber(int band, List<BandInfo> bandinfos)
          Find the index in the list of the first band with the band number.
 String getBandDescription()
          Get the description for the band
 int getBandNumber()
          Get the band number for this BandInfo
 List getCalibrationUnits()
          Cet the calibration units for this BandInfo
 String getPreferredUnit()
          Cet the preferred calibration units for this BandInfo
 int getSensor()
          Get the satellite sensor number for this BandInfo
 int hashCode()
          Get the Hashcode for this object.
 void setBandDescription(String description)
          Set the band description for this BandInfo
 void setBandNumber(int band)
          Set the band number for this BandInfo
 void setCalibrationUnits(List units)
          Set the calibration units for this BandInfo
 void setPreferredUnit(String unit)
          Set the preferred calibration unit for this BandInfo
 void setSensor(int sensor)
          Set the satellite sensor number for this BandInfo
 String toString()
          Get a String Representation of this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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