Class RecordDataSource<T>
- java.lang.Object
-
- io.github.jeremylong.openvulnerability.client.RecordDataSource<T>
-
- Type Parameters:
T- the data type
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.Iterator<T>
public class RecordDataSource<T> extends java.lang.Object implements java.lang.AutoCloseable, java.util.Iterator<T>A simple wrapper around a PagedDataSource that iterates over single objects rather than a page at a time.
-
-
Constructor Summary
Constructors Constructor Description RecordDataSource(PagedDataSource<T> source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetLastStatusCode()Returns the last HTTP Status Code received.java.time.ZonedDateTimegetLastUpdated()Returns the latest updated date.booleanhasNext()Tnext()
-
-
-
Constructor Detail
-
RecordDataSource
public RecordDataSource(PagedDataSource<T> source)
-
-
Method Detail
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
getLastUpdated
public java.time.ZonedDateTime getLastUpdated()
Returns the latest updated date.- Returns:
- the latest updated date
-
getLastStatusCode
public int getLastStatusCode()
Returns the last HTTP Status Code received.- Returns:
- the last HTTP Status Code received.
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T>
-
-