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 voidaddRecord(NetricsRecord rec)Use this method to add records to the NetricsRecSrc.NetricsRecordgetNext()As described for the interface.booleanhasNext()As described for the interface.voidreset()As described for the interface.
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
As described for the interface.- Specified by:
hasNextin interfaceNetricsBaseRecSrc- Returns:
- True if there is another record, false otherwise
-
getNext
public NetricsRecord getNext()
As described for the interface.- Specified by:
getNextin interfaceNetricsBaseRecSrc- Specified by:
getNextin 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:
resetin interfaceNetricsBaseRecSrc
-
-