Package com.netrics.likeit
Class NetricsArrayRecSrc
- java.lang.Object
-
- com.netrics.likeit.NetricsArrayRecSrc
-
- All Implemented Interfaces:
NetricsBaseRecSrc
,NetricsRecSrc
public class NetricsArrayRecSrc extends java.lang.Object implements NetricsRecSrc
A simple array based implementation of the NetricsRecSrc interface.- See Also:
NetricsRecSrc
-
-
Constructor Summary
Constructors Constructor Description NetricsArrayRecSrc()
Create an empty record source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRecord(NetricsRecord rec)
Use this method to add records to the NetricsRecSrc.NetricsRecord
getNext()
As described for the interface.boolean
hasNext()
As described for the interface.void
reset()
As described for the interface.
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
As described for the interface.- Specified by:
hasNext
in interfaceNetricsBaseRecSrc
- Returns:
- True if there is another record, false otherwise
-
getNext
public NetricsRecord getNext()
As described for the interface.- Specified by:
getNext
in interfaceNetricsBaseRecSrc
- Specified by:
getNext
in interfaceNetricsRecSrc
- Returns:
- the next record
-
addRecord
public void addRecord(NetricsRecord rec)
Use this method to add records to the NetricsRecSrc. The records will be stored and returned in the order they are added.- Parameters:
rec
- the record to add
-
reset
public void reset()
As described for the interface.- Specified by:
reset
in interfaceNetricsBaseRecSrc
-
-