public class RangeReadings extends java.util.ArrayList<RangeReading> implements Transmittable
Constructor and Description |
---|
RangeReadings(int numReadings) |
Modifier and Type | Method and Description |
---|---|
void |
dumpObject(java.io.DataOutputStream dos)
Dump the readings to a DataOutputStream
|
float |
getAngle(int index)
Get the angle of a specific reading
|
int |
getNumReadings()
Get the number of readings in a set
|
float |
getRange(float angle)
Get a range reading for a specific angle
|
float |
getRange(int i)
Get a specific range reading
|
boolean |
incomplete()
Return true if the readings are incomplete
|
void |
loadObject(java.io.DataInputStream dis)
Load the readings from a DataInputStream
|
void |
printReadings()
Print the range readings on standard out
|
void |
setRange(int index,
float angle,
float range)
Set the range reading
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public float getRange(int i)
i
- the reading indexpublic float getRange(float angle)
angle
- the reading anglepublic float getAngle(int index)
index
- the index of the readingpublic boolean incomplete()
public int getNumReadings()
public void setRange(int index, float angle, float range)
index
- the index of the reading in the setangle
- the angle of the reading relative to the robot headingrange
- the range readingpublic void dumpObject(java.io.DataOutputStream dos) throws java.io.IOException
dumpObject
in interface Transmittable
dos
- the streamjava.io.IOException
public void loadObject(java.io.DataInputStream dis) throws java.io.IOException
loadObject
in interface Transmittable
dis
- the streamjava.io.IOException
public void printReadings()