View Javadoc
1   /**
2    * Copyright 2010-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.common.util.pojo;
17  
18  import java.util.Map;
19  
20  public class Instance implements Comparable<Instance> {
21  
22  	int startIndex;
23  	int stopIndex;
24  	String id;
25  	String name = "-";
26  	String size = "-";
27  	String state;
28  	Map<String, String> tags;
29  	double monthlyCost;
30  
31  	@Override
32  	public int compareTo(Instance other) {
33  		String compare1 = state + ":" + name;
34  		String compare2 = other.getState() + ":" + other.getName();
35  		return compare1.compareTo(compare2);
36  	}
37  
38  	public String getId() {
39  		return id;
40  	}
41  
42  	public void setId(String id) {
43  		this.id = id;
44  	}
45  
46  	public String getSize() {
47  		return size;
48  	}
49  
50  	public void setSize(String size) {
51  		this.size = size;
52  	}
53  
54  	public Map<String, String> getTags() {
55  		return tags;
56  	}
57  
58  	public void setTags(Map<String, String> tags) {
59  		this.tags = tags;
60  	}
61  
62  	public String getState() {
63  		return state;
64  	}
65  
66  	public void setState(String state) {
67  		this.state = state;
68  	}
69  
70  	public String getName() {
71  		return name;
72  	}
73  
74  	public void setName(String name) {
75  		this.name = name;
76  	}
77  
78  	public int getStartIndex() {
79  		return startIndex;
80  	}
81  
82  	public void setStartIndex(int startIndex) {
83  		this.startIndex = startIndex;
84  	}
85  
86  	public int getStopIndex() {
87  		return stopIndex;
88  	}
89  
90  	public void setStopIndex(int stopIndex) {
91  		this.stopIndex = stopIndex;
92  	}
93  
94  	public double getMonthlyCost() {
95  		return monthlyCost;
96  	}
97  
98  	public void setMonthlyCost(double monthlyCost) {
99  		this.monthlyCost = monthlyCost;
100 	}
101 
102 }