Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5437 mandeep.dh 1
/**
2
 * 
3
 */
4
package in.shop2020.inventory.service;
5
 
6
/**
7
 * @author mandeep
8
 *
9
 */
10
public class DivisionStrategy implements Strategy {
11
    long divisionFactor;
12
 
13
    public DivisionStrategy(long factor) {
14
        divisionFactor = factor;
15
    }
16
 
17
    /* (non-Javadoc)
18
     * @see in.shop2020.inventory.service.Strategy#compute(long, long, long)
19
     */
20
    public long compute(long itemId, long warehouseId, long quantity) {
21
        return quantity / divisionFactor;
22
    }
23
}