Package org.jeasy.batch.core.record
Class Batch<P>
- java.lang.Object
-
- org.jeasy.batch.core.record.Batch<P>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRecord(Record<P> record)Add a record to the batch.booleanequals(java.lang.Object o)inthashCode()booleanisEmpty()Check if the batch is empty.java.util.Iterator<Record<P>>iterator()voidremoveRecord(Record<P> record)Remove a record from the batch.longsize()Get the size of the batch.java.lang.StringtoString()
-
-
-
Method Detail
-
addRecord
public void addRecord(Record<P> record)
Add a record to the batch.- Parameters:
record- to add
-
removeRecord
public void removeRecord(Record<P> record)
Remove a record from the batch.- Parameters:
record- to remove
-
isEmpty
public boolean isEmpty()
Check if the batch is empty.- Returns:
- true if the batch is empty, false otherwise
-
size
public long size()
Get the size of the batch.- Returns:
- the size of the batch
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
iterator
public java.util.Iterator<Record<P>> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<P>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-