|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoptics.Optics
public abstract class Optics
Abstract class with all other Optics classes
extends. This contains the version number
microns conversion and format string and
error PrintStream
.
Field Summary | |
---|---|
static double |
DEFAULT_WAVELENGTH
Public static to set the default wavelength, initially set to Constants.GREEN |
protected static java.io.PrintStream |
errorStream
PrintStream for error messages. |
protected static java.lang.String |
fmt
String to format a double. |
static double |
MICRONS
Public static to scale package distance units to microns. |
Constructor Summary | |
---|---|
Optics()
|
Method Summary | |
---|---|
double |
getDefaultWaveLength()
Method to get the default wavelength in microns. |
java.io.PrintStream |
getErrorStream()
Method to get the current errorStream |
java.lang.String |
getFormatString()
Method to get the current format string. |
java.lang.String |
getName()
Method to get the class name as a String with leading package details removed. |
static java.lang.String |
getStaticName(java.lang.Object o)
Static method to get get the name of an object. |
java.lang.String |
getVersion()
Method to get the package version. |
void |
printError(java.lang.String e)
Method to print an error message to current errorStream |
void |
setDefaultWaveLength(double lambda)
Method to se tthe default wavelength in microns. |
void |
setErrorStream(java.io.PrintStream ps)
Method to set the errorStream
where warning and error message are printed. |
void |
setFormatString(java.lang.String s)
Method to set the double format String, the default is %g. |
void |
setMicrons(double microns)
Method to set the global static for microns conversion. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double DEFAULT_WAVELENGTH
Constants.GREEN
public static double MICRONS
protected static java.lang.String fmt
protected static java.io.PrintStream errorStream
System.err
.
Constructor Detail |
---|
public Optics()
Method Detail |
---|
public java.lang.String getVersion()
String the version string
public double getDefaultWaveLength()
double
the default wavelengthpublic void setDefaultWaveLength(double lambda)
Constants.GREEN
.
lambda
- the new default wavelnegthpublic void setMicrons(double microns)
Use with extreme care, mostly an untested feature!
microns
- package unit to microns conversion.public java.lang.String getFormatString()
Strin
the current format string.public void setFormatString(java.lang.String s)
s
- the format stringpublic void setErrorStream(java.io.PrintStream ps)
errorStream
where warning and error message are printed.
ps
- the PrintStream
public java.io.PrintStream getErrorStream()
errorStream
PrintStream
current streampublic void printError(java.lang.String e)
errorStream
e
- the error message.public java.lang.String getName()
toString
methods.
String
the class name.public static java.lang.String getStaticName(java.lang.Object o)
o
- the Object
String
object same as a String.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |