00001
00002
00003
00004
00005
00007
00008 package de.pik.lagom.generic;
00009
00010 import java.util.Comparator;
00011
00015 public interface ISeller {
00017 double getInventory();
00019 double getPrice();
00021 Sector getProductionSector();
00022
00023 double getBenchmarkSupply();
00024 double getBAUSupply();
00025 double getExtraSupply();
00027 void sell(double pQuantity);
00028
00033 static public class PriceComparator implements Comparator<ISeller> {
00034 public int compare(ISeller pSeller0, ISeller pSeller1) {
00035
00036 final double lPrice0 = pSeller0.getPrice();
00037 final double lPrice1 = pSeller1.getPrice();
00038
00039
00040 if (lPrice0 < lPrice1) {
00041 return -1;
00042 } else {
00043 return 1;
00044 }
00045 }
00046 }
00047 }
00048
00050