PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/farmR/src/java/src/jfm/model/ELSOptionComponent.java

https://code.google.com/p/javawfm/
Java | 40 lines | 17 code | 6 blank | 17 comment | 0 complexity | 6fbe6295c8454d8a488da76715adc685 MD5 | raw file
 1/**
 2 * 
 3 */
 4package jfm.model;
 5
 6import jfm.lp.ModelComponent;
 7import jfm.lp.ModelComponent.MCType;
 8import jfm.lp.MatrixVariable;
 9import jfm.model.ELSOption;
10import jfm.model.Types.ELSCode;
11import java.util.*;
12/**
13 * @author iracooke
14 *
15 */
16public abstract class ELSOptionComponent extends ModelComponent {
17
18	protected HashMap<ELSCode,ELSOption> options=new HashMap<ELSCode,ELSOption>();
19
20	public Set<ELSOption> getOptions(){
21		HashSet<ELSOption> rv = new HashSet<ELSOption>(options.values());
22		return Collections.unmodifiableSet(rv);
23	}
24	
25	ELSOptionComponent(MCType type_){
26		super(type_);
27	};	
28	
29/*	protected ELSOption getOption(ELSCode code){
30		for(ELSOption eo:options){
31			if ( eo.code==code){
32				return eo;
33			}
34		}
35		
36		throw new Error("Option "+code+" not found ");
37		
38	}*/
39	
40}