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.java.lang.Integer
getCount()
Get the count of records that have been retrieved from the record source.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
-
getCount
public java.lang.Integer getCount()
Description copied from interface:NetricsBaseRecSrc
Get the count of records that have been retrieved from the record source.
Sources that don't support a count will return null.- Specified by:
getCount
in interfaceNetricsBaseRecSrc
- Returns:
- The number of records that have been retrieved from the record source.
-
-