src/de/pik/lagom/generic/ISeller.java

00001 
00002 // Copyright 2010 by Carlo Jaeger, Antoine Mandel, Steffen Fuerst and European Climate Forum
00003 // Licensed under the Open Software License version 3.0
00004 // See the file "License-OSL-3.0.txt" in the distribution for more information 
00005 // The License text can be also found under http://www.opensource.org/licenses/osl-3.0.php
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       // first determine the wage reference of both firms ...
00036       final double lPrice0 = pSeller0.getPrice();
00037       final double lPrice1 = pSeller1.getPrice();
00038 
00039       // ... then compare it
00040       if (lPrice0 < lPrice1) {
00041         return -1;
00042       } else {
00043         return 1;
00044       } 
00045     }
00046   }
00047 }
00048 
00050 // EOF

Generated on Tue Sep 14 11:11:48 2010 for lagom_generiC by  doxygen 1.5.4