com.rubecula.jquantity
Class Loader

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended bycom.rubecula.util.ConvenientProperties
                  extended bycom.rubecula.jquantity.QuantityProperties
                      extended bycom.rubecula.jquantity.Loader
All Implemented Interfaces:
java.lang.Cloneable, Lookupable, java.util.Map, java.io.Serializable

public class Loader
extends QuantityProperties

This public class is used to populate the JQuantity system at run-time with various definitions of units, etc.

Version:
$Revision: 1.13 $
Author:
Robin Hillyard
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Field Summary
private  java.util.Set _Failures
          Set containing all current failures.
private static java.lang.String $S_OPS
           
 
Fields inherited from class com.rubecula.util.ConvenientProperties
 
Fields inherited from class java.util.Properties
defaults
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
Loader(java.io.File file, MillInterface mill)
           
Loader(java.io.InputStream stream, MillInterface mill)
           
Loader(java.lang.String file, MillInterface mill)
           
 
Method Summary
static void CreateUnits(java.io.PrintStream out, UnitsName name, JQuantity q, SystemFlag system)
           
private  JQuantity getQuantity(java.lang.String value)
           
 boolean loadTable(java.io.PrintStream out)
           
private  boolean LoadTableOnePass(java.io.PrintStream out)
           
 
Methods inherited from class com.rubecula.jquantity.QuantityProperties
getKeys, getValue
 
Methods inherited from class com.rubecula.util.ConvenientProperties
getComment, getProperty, keys, list, setComment
 
Methods inherited from class java.util.Properties
getProperty, list, load, propertyNames, save, setProperty, store
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

$S_OPS

private static final java.lang.String $S_OPS
See Also:
Constant Field Values

_Failures

private final java.util.Set _Failures
Set containing all current failures.

Constructor Detail

Loader

public Loader(java.io.InputStream stream,
              MillInterface mill)
       throws java.io.IOException

Loader

public Loader(java.io.File file,
              MillInterface mill)
       throws java.io.FileNotFoundException,
              java.io.IOException

Loader

public Loader(java.lang.String file,
              MillInterface mill)
       throws java.io.FileNotFoundException,
              java.io.IOException
Method Detail

CreateUnits

public static void CreateUnits(java.io.PrintStream out,
                               UnitsName name,
                               JQuantity q,
                               SystemFlag system)

loadTable

public boolean loadTable(java.io.PrintStream out)

LoadTableOnePass

private boolean LoadTableOnePass(java.io.PrintStream out)

getQuantity

private JQuantity getQuantity(java.lang.String value)
                       throws PresentationException
Throws:
PresentationException