/** * Instances which have same name, authority and parameters are equal. */ public boolean equals(Object oo) { if (this == oo) return true; if (!(oo instanceof CoordinateTransform)) return false; CoordinateTransform o = (CoordinateTransform) oo; if (!getName().equals(o.getName())) return false; if (!getAuthority().equals(o.getAuthority())) return false; if (!(getTransformType() == o.getTransformType())) return false; List<Parameter> oparams = o.getParameters(); if (params.size() != oparams.size()) return false; for (int i = 0; i < params.size(); i++) { Parameter att = params.get(i); Parameter oatt = oparams.get(i); if (!att.getName().equals(oatt.getName())) return false; //if (!att.getValue().equals(oatt.getValue())) return false; } return true; }
/** * Instances which have same name, authority and parameters are equal. */ public boolean equals(Object oo) { if (this == oo) return true; if (!(oo instanceof CoordinateTransform)) return false; CoordinateTransform o = (CoordinateTransform) oo; if (!getName().equals(o.getName())) return false; if (!getAuthority().equals(o.getAuthority())) return false; if (!(getTransformType() == o.getTransformType())) return false; List<Parameter> oparams = o.getParameters(); if (params.size() != oparams.size()) return false; for (int i = 0; i < params.size(); i++) { Parameter att = params.get(i); Parameter oatt = oparams.get(i); if (!att.getName().equals(oatt.getName())) return false; //if (!att.getValue().equals(oatt.getValue())) return false; } return true; }
/** * Override Object.hashCode() to be consistent with equals. */ public int hashCode() { if (hashCode == 0) { int result = 17; result = 37 * result + getName().hashCode(); result = 37 * result + getAuthority().hashCode(); result = 37 * result + getTransformType().hashCode(); for (Parameter att : params) { result = 37 * result + att.getName().hashCode(); //result = 37*result + att.getValue().hashCode(); } hashCode = result; } return hashCode; }
/** * Instances which have same name, authority and parameters are equal. */ public boolean equals(Object oo) { if (this == oo) return true; if (!(oo instanceof CoordinateTransform)) return false; CoordinateTransform o = (CoordinateTransform) oo; if (!getName().equals(o.getName())) return false; if (!getAuthority().equals(o.getAuthority())) return false; if (!(getTransformType() == o.getTransformType())) return false; List<Parameter> oparams = o.getParameters(); if (params.size() != oparams.size()) return false; for (int i = 0; i < params.size(); i++) { Parameter att = params.get(i); Parameter oatt = oparams.get(i); if (!att.getName().equals(oatt.getName())) return false; //if (!att.getValue().equals(oatt.getValue())) return false; } return true; }
/** * Override Object.hashCode() to be consistent with equals. */ public int hashCode() { if (hashCode == 0) { int result = 17; result = 37 * result + getName().hashCode(); result = 37 * result + getAuthority().hashCode(); result = 37 * result + getTransformType().hashCode(); for (Parameter att : params) { result = 37 * result + att.getName().hashCode(); //result = 37*result + att.getValue().hashCode(); } hashCode = result; } return hashCode; }
/** * Override Object.hashCode() to be consistent with equals. */ public int hashCode() { if (hashCode == 0) { int result = 17; result = 37 * result + getName().hashCode(); result = 37 * result + getAuthority().hashCode(); result = 37 * result + getTransformType().hashCode(); for (Parameter att : params) { result = 37 * result + att.getName().hashCode(); //result = 37*result + att.getValue().hashCode(); } hashCode = result; } return hashCode; }
private Element makeCoordTransform( CoordinateTransform coordTransform) { Element elem = new Element("coordinateTransform", ncNS); elem.setAttribute("name", coordTransform.getName()); elem.setAttribute("authority", coordTransform.getAuthority()); if (coordTransform.getTransformType() != null) elem.setAttribute("transformType", coordTransform.getTransformType().toString()); List<Parameter> params = coordTransform.getParameters(); for (Parameter p : params) { elem.addContent(makeAttribute(p, "parameter")); } return elem; }
private Element makeCoordTransform( CoordinateTransform coordTransform) { Element elem = new Element("coordinateTransform", ncNS); elem.setAttribute("name", coordTransform.getName()); elem.setAttribute("authority", coordTransform.getAuthority()); if (coordTransform.getTransformType() != null) elem.setAttribute("transformType", coordTransform.getTransformType().toString()); List<Parameter> params = coordTransform.getParameters(); for (Parameter p : params) { elem.addContent(makeAttribute(p, "parameter")); } return elem; }
private Element makeCoordTransform( CoordinateTransform coordTransform) { Element elem = new Element("coordinateTransform", thredds.client.catalog.Catalog.ncmlNS); elem.setAttribute("name", coordTransform.getName()); elem.setAttribute("authority", coordTransform.getAuthority()); if (coordTransform.getTransformType() != null) elem.setAttribute("transformType", coordTransform.getTransformType().toString()); List<Parameter> params = coordTransform.getParameters(); for (Parameter p : params) { elem.addContent(makeAttribute(p, "parameter")); } return elem; }