1 package org.geojson; 2 3 import org.geojson.jackson.CrsType; 4 5 import java.io.Serializable; 6 import java.util.HashMap; 7 import java.util.Map; 8 9 public class Crs implements Serializable{ 10 11 private CrsType type = CrsType.name; 12 private Map<String, Object> properties = new HashMap<String, Object>(); 13 getType()14 public CrsType getType() { 15 return type; 16 } 17 setType(CrsType type)18 public void setType(CrsType type) { 19 this.type = type; 20 } 21 getProperties()22 public Map<String, Object> getProperties() { 23 return properties; 24 } 25 setProperties(Map<String, Object> properties)26 public void setProperties(Map<String, Object> properties) { 27 this.properties = properties; 28 } 29 30 @Override equals(Object o)31 public boolean equals(Object o) { 32 if (this == o) { 33 return true; 34 } 35 if (!(o instanceof Crs)) { 36 return false; 37 } 38 Crs crs = (Crs)o; 39 if (properties != null ? !properties.equals(crs.properties) : crs.properties != null) { 40 return false; 41 } 42 return !(type != null ? !type.equals(crs.type) : crs.type != null); 43 } 44 45 @Override hashCode()46 public int hashCode() { 47 int result = type != null ? type.hashCode() : 0; 48 result = 31 * result + (properties != null ? properties.hashCode() : 0); 49 return result; 50 } 51 52 @Override toString()53 public String toString() { 54 return "Crs{" + "type='" + type + '\'' + ", properties=" + properties + '}'; 55 } 56 } 57