optics
Class RefractiveIndex

java.lang.Object
  extended by optics.Optics
      extended by optics.WaveLengthFunction
          extended by optics.RefractiveIndex
Direct Known Subclasses:
CauchyIndex, FixedIndex, HoyaIndex, SchottIndex, SellmeirIndex

public abstract class RefractiveIndex
extends WaveLengthFunction

Abstract class for refractive index being a scalar value that depends on wavelength.


Field Summary
static RefractiveIndex air
          Static RefractiveIndex to represent air, being a FixedIndex on index 1.0
protected  double currentIndex
          Current numerical value of the index, used to prevent multiple calcualations of complex index calcualtions.
protected  double currentWaveLength
          The current value of the wavelength, used to prevent multiple calcualations of complex index calcualtions.
 
Fields inherited from class optics.WaveLengthFunction
maxPlotLambda, minPlotLambda, plotPoints
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS
 
Constructor Summary
RefractiveIndex()
           
 
Method Summary
static RefractiveIndex fromString(java.lang.String s)
          Static method to get a Refractive Index from a specifying String.
static RefractiveIndex fromTokens(java.util.StringTokenizer tokens)
          Static method to get a Refractive Index set of tokens with the first token giving the type
 double getIndex()
          Method to return the refarctive index at the current DEFAULT_WAVELENGTH.
abstract  double getIndex(double lambda)
          Method to return the value of the refractive index.
 double getIndex(Ray r)
          Method to return value of the refrective index with wavelength specifed by a Ray, or one it extending classes.
 double getValue(double lambda)
          Overload of method for WavelengthFunction
 
Methods inherited from class optics.WaveLengthFunction
getPlot, getPlotPoints, setPlotPoints, setPlotRange, setPlotRange, toGraph, toPlot, toPlot, toPlot
 
Methods inherited from class optics.Optics
getDefaultWaveLength, getErrorStream, getFormatString, getName, getStaticName, getVersion, printError, setDefaultWaveLength, setErrorStream, setFormatString, setMicrons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

air

public static RefractiveIndex air
Static RefractiveIndex to represent air, being a FixedIndex on index 1.0

See Also:
FixedIndex

currentIndex

protected double currentIndex
Current numerical value of the index, used to prevent multiple calcualations of complex index calcualtions.


currentWaveLength

protected double currentWaveLength
The current value of the wavelength, used to prevent multiple calcualations of complex index calcualtions.

Constructor Detail

RefractiveIndex

public RefractiveIndex()
Method Detail

getIndex

public abstract double getIndex(double lambda)
Method to return the value of the refractive index.

Parameters:
lambda - the wavelength.
Returns:
double the refractive index value.

getIndex

public double getIndex()
Method to return the refarctive index at the current DEFAULT_WAVELENGTH.

Returns:
double the refractive index value.

getIndex

public double getIndex(Ray r)
Method to return value of the refrective index with wavelength specifed by a Ray, or one it extending classes.

Parameters:
r - the ray.

getValue

public double getValue(double lambda)
Overload of method for WavelengthFunction

Specified by:
getValue in class WaveLengthFunction
Parameters:
lambda - the wavelength.
Returns:
double the refractive index value.

fromString

public static RefractiveIndex fromString(java.lang.String s)
Static method to get a Refractive Index from a specifying String.

Parameters:
s - specifying String
Returns:
RefractiveIndex fails to Air

fromTokens

public static RefractiveIndex fromTokens(java.util.StringTokenizer tokens)
Static method to get a Refractive Index set of tokens with the first token giving the type

Parameters:
tokens - set of tokens
Returns:
RefractiveIndex fails to Air