data.swing
Class CountingStockDBEGrouper
java.lang.Object
|
+--data.swing.CountingStockDBEGrouper
- public class CountingStockDBEGrouper
- extends Object
- implements DataBasketEntryGrouper
DataBasketEntryGrouper that groups entries that have the same main and secondary key as well as the same
source and destination and where both values contain an Integer
object. These are DataBasketEntries
that describe operations on CountingStock items.
- Since:
- v2.0
- Version:
- 2.0 23/08/1999
- Author:
- Steffen Zschaler
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CountingStockDBEGrouper
public CountingStockDBEGrouper()
- Create a new CountingStockDBEGrouper.
canGroup
public boolean canGroup(DataBasketEntry dbe1,
DataBasketEntry dbe2)
- Return true if
dbe1
and dbe2
have the same main and secondary key as well as
the same source and destination and both values contain an Integer
object.
- Override:
- Never.
- Specified by:
- canGroup in interface DataBasketEntryGrouper
group
public DataBasketEntry group(DataBasketEntry dbe1,
DataBasketEntry dbe2)
- Return a new DataBasketEntry with the same main and secondary key, source and destination as
dbe1
and a value of dbe1.getValue() + dbe2.getValue()
.
The returned DataBasketEntry cannot be used for commiting or rolling back operations.
- Override:
- Never.
- Specified by:
- group in interface DataBasketEntryGrouper