optics
Class FixedIndex

java.lang.Object
  extended by optics.Optics
      extended by optics.WaveLengthFunction
          extended by optics.RefractiveIndex
              extended by optics.FixedIndex

public class FixedIndex
extends RefractiveIndex

Class to implement a Fixed Index that does not vary with wavelength.


Field Summary
 
Fields inherited from class optics.RefractiveIndex
air, currentIndex, currentWaveLength
 
Fields inherited from class optics.WaveLengthFunction
maxPlotLambda, minPlotLambda, plotPoints
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS
 
Constructor Summary
FixedIndex()
          Constructor with no parameters, defaults to Constants.AIR (normally 1.0).
FixedIndex(double index)
          Constructor with single parameter.
 
Method Summary
 FixedIndex Air()
          Static method to return the air index
 FixedIndex clone()
          Method to get clone of the current FixedIndex.
 double getIndex(double lambda)
          Method to return refractive index for a specified wavelength.
 void setIndex(double n)
          Method to set the index.
 java.lang.String toString()
          Method to get the name in format readable by OpticalGroup.fromFile
 
Methods inherited from class optics.RefractiveIndex
fromString, fromTokens, getIndex, getIndex, getValue
 
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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FixedIndex

public FixedIndex(double index)
Constructor with single parameter. the refative index.

Parameters:
index - The refractive index value

FixedIndex

public FixedIndex()
Constructor with no parameters, defaults to Constants.AIR (normally 1.0).

See Also:
Constants.AIR
Method Detail

clone

public FixedIndex clone()
Method to get clone of the current FixedIndex.

Overrides:
clone in class java.lang.Object
Returns:
FixedIndex clone of current index.

toString

public java.lang.String toString()
Method to get the name in format readable by OpticalGroup.fromFile

Overrides:
toString in class java.lang.Object
Returns:
name

setIndex

public void setIndex(double n)
Method to set the index.

Parameters:
n - the refrative index value.

getIndex

public double getIndex(double lambda)
Method to return refractive index for a specified wavelength.

Specified by:
getIndex in class RefractiveIndex
Parameters:
lambda - Wavelength in microns (ignored)
Returns:
double the refractive index value.

Air

public FixedIndex Air()
Static method to return the air index