|
|||||||||
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<RangeReading>
lejos.robotics.RangeReadings
public class RangeReadings
Represents a set of range readings.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
RangeReadings(int numReadings)
|
Method Summary | |
---|---|
void |
dumpReadings(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 |
loadReadings(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 |
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 RangeReadings(int numReadings)
Method Detail |
---|
public float getRange(int i)
i
- the reading index
public float getRange(float angle)
angle
- the reading angle
public float getAngle(int index)
index
- the index of the reading
public 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 dumpReadings(java.io.DataOutputStream dos) throws java.io.IOException
dos
- the stream
java.io.IOException
public void loadReadings(java.io.DataInputStream dis) throws java.io.IOException
dis
- the stream
java.io.IOException
public void printReadings()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |