|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Property>
com.timjohnstondev.unitconverter.model.PropertyList
public class PropertyList
A collection of Propertys and their unit symbols/names from the data source.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
PropertyList()
|
|
| Method Summary | |
|---|---|
String |
getConversion(String propertyName,
String fromSymbol,
String toSymbol)
Returns the Conversion factor or formula for the given Property for going from one set of units to
another. |
List<String> |
getPropertyNames()
Returns a list of all the Property names in the data source. |
List<String> |
getSymbols(String propertyName)
Returns a list of all the symbols for the given Property in the data source. |
List<String> |
getSymbols(String property,
String fromSymbol)
Returns a list, minus the symbol provided, of the symbols for the given Property in the data source. |
String |
getUnitName(String propertyName,
String unitSymbol)
Returns this symbol's name in unabbreviated words for this Property. |
void |
setUnitSeparator(String symbol)
Updates the unit separator symbol |
boolean |
usesMoles(String propertyName)
Returns true if this Property can do mole to mass and mass to mole unit conversions, else false |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public PropertyList()
| Method Detail |
|---|
public final List<String> getPropertyNames()
Property names in the data source. This list is organized by the order the
properties appear in the data source.
Property names
public final String getConversion(String propertyName,
String fromSymbol,
String toSymbol)
Conversion factor or formula for the given Property for going from one set of units to
another.
propertyName - the name of the Property that will be converted, such as temperature, pressure or
lengthfromSymbol - the original unitstoSymbol - the desired units
Conversion factor or formula to perform the conversionpublic final List<String> getSymbols(String propertyName)
Property in the data source. The order of the symbols is
determined by the underlying Property. This list order was initially based on the order the symbols appear
in the data source for the Property.
propertyName - the name of the Property that is the basis for the units
public final List<String> getSymbols(String property,
String fromSymbol)
Property in the data source. The
order of the symbols is determined by the underlying Property. This list order was initially based on the
order the symbols appear in the data source for this Property.
property - the name of the Property that is the basis for the unitsfromSymbol - the symbol to leave out of the list
public final String getUnitName(String propertyName,
String unitSymbol)
Property.
propertyName - the name of the Property that is the basis for this unitunitSymbol - the symbol that represents the returned name
public final void setUnitSeparator(String symbol)
symbol - the new unit separator symbolpublic final boolean usesMoles(String propertyName)
true if this Property can do mole to mass and mass to mole unit conversions, else false
propertyName - name of the property
true if this Property can do mole to mass and mass to mole unit conversions, else false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||