edu.sc.seis.fissuresUtil.bag
Class Promote

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.bag.Promote

public class Promote
extends java.lang.Object

Promots one type of primitive number array to another. Created: Wed Nov 6 18:31:14 2002


Field Summary
protected  java.lang.Number num
           
 
Constructor Summary
Promote(java.lang.Number num)
          Creates a new Promote instace.
 
Method Summary
 edu.iris.Fissures.seismogramDC.LocalSeismogramImpl apply(edu.iris.Fissures.seismogramDC.LocalSeismogramImpl seis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

num

protected java.lang.Number num
Constructor Detail

Promote

public Promote(java.lang.Number num)
Creates a new Promote instace. This promotes an array of one primitive type to another type. Going from some types to others may result in a loss of precision, such as float to int or int to short. The type to convert to is given in the constructor as a Number. The class is used as a key.

Parameters:
num - an instance of one of Short, Integer, Float or Double
Method Detail

apply

public edu.iris.Fissures.seismogramDC.LocalSeismogramImpl apply(edu.iris.Fissures.seismogramDC.LocalSeismogramImpl seis)
                                                         throws java.lang.Exception
Throws:
java.lang.Exception