aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/geojson/Crs.java
blob: 9aa203c86c288e938ce0970f5eb1d7d14a74ee4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package org.geojson;

import org.geojson.jackson.CrsType;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Crs implements Serializable{

	private CrsType type = CrsType.name;
	private Map<String, Object> properties = new HashMap<String, Object>();

	public CrsType getType() {
		return type;
	}

	public void setType(CrsType type) {
		this.type = type;
	}

	public Map<String, Object> getProperties() {
		return properties;
	}

	public void setProperties(Map<String, Object> properties) {
		this.properties = properties;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof Crs)) {
			return false;
		}
		Crs crs = (Crs)o;
		if (properties != null ? !properties.equals(crs.properties) : crs.properties != null) {
			return false;
		}
		return !(type != null ? !type.equals(crs.type) : crs.type != null);
	}

	@Override
	public int hashCode() {
		int result = type != null ? type.hashCode() : 0;
		result = 31 * result + (properties != null ? properties.hashCode() : 0);
		return result;
	}

	@Override
	public String toString() {
		return "Crs{" + "type='" + type + '\'' + ", properties=" + properties + '}';
	}
}