public class Units
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
| Constructor and Description |
|---|
Units()
Simple constructor.
|
Units(java.lang.String temperature,
java.lang.String distance,
java.lang.String pressure,
java.lang.String speed) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDistance()
Units of distance
|
java.lang.String |
getPressure()
Units of pressure
|
java.lang.String |
getSpeed()
Units of speed
|
java.lang.String |
getTemperature()
Units of Temperature.
|
int |
hashCode() |
void |
setDistance(java.lang.String distance)
Units of distance
|
void |
setPressure(java.lang.String pressure)
Units of pressure
|
void |
setSpeed(java.lang.String speed)
Units of speed
|
void |
setTemperature(java.lang.String temperature)
Units of Temperature.
|
java.lang.String |
toString() |
public Units()
public Units(java.lang.String temperature,
java.lang.String distance,
java.lang.String pressure,
java.lang.String speed)
temperature - units of temp ("f" or "c");distance - units of distance ("mi" or "km")pressure - units of pressure ("in" or "mb")speed - units of speed ("mph" or "kph")public java.lang.String getTemperature()
public void setTemperature(java.lang.String temperature)
temperature - units of temp ("f" or "c");public java.lang.String getDistance()
public void setDistance(java.lang.String distance)
distance - units of distance ("mi" or "km")public java.lang.String getPressure()
public void setPressure(java.lang.String pressure)
pressure - units of pressure ("in" or "mb")public java.lang.String getSpeed()
public void setSpeed(java.lang.String speed)
speed - units of speed ("mph" or "kph")public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.ObjectCopyright © 2025. All rights reserved.