|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFinchSensor
public class FinchSensor
Representation of a single sample of sensor values from the Finch. In particular, a sample contains:
Field Summary | |
---|---|
private double[] |
acceleration
Holds the array of acceleration values |
private int[] |
light
Holds the array of light values |
private boolean[] |
obstacle
Holds the array of obstacle values |
private long |
sample_time
The time (in milliseconds) that the sample was taken. |
private double |
temperature
Holds the temperature value |
Constructor Summary | |
---|---|
FinchSensor(int[] light,
double[] acceleration,
boolean[] obstacle,
double temperature)
Primary constructor |
Method Summary | |
---|---|
int |
compareTo(FinchSensor obj)
Compare this FinchSensor to obj using the "natural ordering" (by time that the sample was taken) |
double[] |
getAcceleration()
Accessor to acceleration |
int[] |
getLight()
Light level accessor |
boolean[] |
getObstacle()
Accessor to obstacle sensor |
long |
getSampleTime()
Accessor to the sample time |
double |
getTemperature()
Accessor to temperature. |
java.lang.String |
toString()
Overriding the Object toString method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int[] light
private double[] acceleration
private boolean[] obstacle
private double temperature
private long sample_time
Constructor Detail |
---|
public FinchSensor(int[] light, double[] acceleration, boolean[] obstacle, double temperature)
light
- 2-element array of light levelsacceleration
- 3-element array of acceleration valuesobstacle
- 2-element array of obstacle valuestemperature
- TemperatureMethod Detail |
---|
public double[] getAcceleration()
public double getTemperature()
public int[] getLight()
public boolean[] getObstacle()
public long getSampleTime()
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(FinchSensor obj)
compareTo
in interface java.lang.Comparable<FinchSensor>
obj
- FinchSensor object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |