String dimName = dimension.getFullName(); Group group = dimension.getGroup();
@Override public void hashCodeShow(Indent indent) { System.out.printf("%sDim hash = %d%n", indent, hashCode()); System.out.printf("%s shortName '%s' = %d%n", indent, getShortName(), getShortName() == null ? -1 : getShortName().hashCode()); System.out.printf("%s getLength %s%n", indent, getLength()); System.out.printf("%s isUnlimited %s%n", indent, isUnlimited()); System.out.printf("%s isVariableLength %s%n", indent, isVariableLength()); System.out.printf("%s isShared %s%n", indent, isShared()); if (getGroup() != null) System.out.printf("%s parentGroup %s = %d%n", indent, getGroup(), getGroup().hashCode()); }
@Override public void hashCodeShow(Indent indent) { System.out.printf("%sDim hash = %d%n", indent, hashCode()); System.out.printf("%s shortName '%s' = %d%n", indent, getShortName(), getShortName() == null ? -1 : getShortName().hashCode()); System.out.printf("%s getLength %s%n", indent, getLength()); System.out.printf("%s isUnlimited %s%n", indent, isUnlimited()); System.out.printf("%s isVariableLength %s%n", indent, isVariableLength()); System.out.printf("%s isShared %s%n", indent, isShared()); if (getGroup() != null) System.out.printf("%s parentGroup %s = %d%n", indent, getGroup(), getGroup().hashCode()); }
private Dimension checkUnknownDims(String wantDim, List<Dimension> unknownDims, Dimension oldDim, String location) { for (Dimension dim : unknownDims) { if (dim.getShortName().equals(wantDim)) { int len = oldDim.getLength(); if (len == 0) { dim.setUnlimited(true); // allow zero length dimension !! } dim.setLength(len); // use existing (anon) dimension Group parent = dim.getGroup(); parent.addDimensionIfNotExists(dim); // add to the parent unknownDims.remove(dim); // remove from list LOOK is this ok? log.warn("unknownDim {} length set to {}{}", wantDim, oldDim.getLength(), location); return dim; } } return null; }
private Dimension checkUnknownDims(String wantDim, List<Dimension> unknownDims, Dimension oldDim, String location) { for (Dimension dim : unknownDims) { if (dim.getShortName().equals(wantDim)) { int len = oldDim.getLength(); if (len == 0) dim.setUnlimited( true); // allow zero length dimension !! dim.setLength(len); // use existing (anon) dimension Group parent = dim.getGroup(); parent.addDimensionIfNotExists(dim); // add to the parent unknownDims.remove(dim); // remove from list LOOK is this ok? log.warn("unknownDim {} length set to {}{}", new Object[] {wantDim, oldDim.getLength(), location}); return dim; } } return null; }
private Dimension checkUnknownDims(String wantDim, List<Dimension> unknownDims, Dimension oldDim, String location) { for (Dimension dim : unknownDims) { if (dim.getShortName().equals(wantDim)) { int len = oldDim.getLength(); if (len == 0) dim.setUnlimited( true); // allow zero length dimension !! dim.setLength(len); // use existing (anon) dimension Group parent = dim.getGroup(); parent.addDimensionIfNotExists(dim); // add to the parent unknownDims.remove(dim); // remove from list LOOK is this ok? log.warn("unknownDim {} length set to {}{}", new Object[] {wantDim, oldDim.getLength(), location}); return dim; } } return null; }
Group current = dim.getGroup();
Group current = dim.getGroup();
Group current = dim.getGroup();
/** * Override Object.hashCode() to implement equals. */ @Override public int hashCode() { if(CDMNode.OBJECTHASH) return super.hashCode(); else { if (hashCode == 0) { int result = 17; Group g = getGroup(); if (g != null) result += 37 * result + g.hashCode(); if (null != getShortName()) result += 37 * result + getShortName().hashCode(); result += 37 * result + getLength(); result += 37 * result + (isUnlimited() ? 0 : 1); result += 37 * result + (isVariableLength() ? 0 : 1); result += 37 * result + (isShared() ? 0 : 1); hashCode = result; } return hashCode; } } private int hashCode = 0;
/** * Override Object.hashCode() to implement equals. */ @Override public int hashCode() { if (hashCode == 0) { int result = 17; Group g = getGroup(); if (g != null) result += 37 * result + g.hashCode(); if (null != getShortName()) result += 37 * result + getShortName().hashCode(); result += 37 * result + getLength(); result += 37 * result + (isUnlimited() ? 0 : 1); result += 37 * result + (isVariableLength() ? 0 : 1); result += 37 * result + (isShared() ? 0 : 1); hashCode = result; } return hashCode; }
assert dim != null; String name = config.structName == null ? "anon" : config.structName; struct = new StructurePseudoDS(ds, dim.getGroup(), name, config.vars, this.dim); break; assert dim != null; assert config.outerName != null; struct = new StructurePseudo2Dim(ds, dim.getGroup(), config.structName, config.vars, this.dim, this.outer); break;
/** * Override Object.hashCode() to implement equals. */ @Override public int hashCode() { if (hashCode == 0) { int result = 17; Group g = getGroup(); if (g != null) result += 37 * result + g.hashCode(); if (null != getShortName()) result += 37 * result + getShortName().hashCode(); result += 37 * result + getLength(); result += 37 * result + (isUnlimited() ? 0 : 1); result += 37 * result + (isVariableLength() ? 0 : 1); result += 37 * result + (isShared() ? 0 : 1); hashCode = result; } return hashCode; }
assert dim != null; String name = config.structName == null ? "anon" : config.structName; struct = new StructurePseudoDS(ds, dim.getGroup(), name, config.vars, this.dim); break; assert dim != null; assert config.outerName != null; struct = new StructurePseudo2Dim(ds, dim.getGroup(), config.structName, config.vars, this.dim, this.outer); break;
assert dim != null; String name = config.structName == null ? "anon" : config.structName; struct = new StructurePseudoDS(ds, dim.getGroup(), name, config.vars, this.dim); break; assert dim != null; assert config.outerName != null; struct = new StructurePseudo2Dim(ds, dim.getGroup(), config.structName, config.vars, this.dim, this.outer); break;
/** * Instances which have same contents are equal. * Careful!! this is not object identity !! */ @Override public boolean equals(Object oo) { if (this == oo) return true; if ( !(oo instanceof Dimension)) return false; Dimension other = (Dimension) oo; Group g = getGroup(); if ((g != null) && !g.equals(other.getGroup())) return false; if ((getShortName() == null) && (other.getShortName() != null)) return false; if ((getShortName() != null) && !getShortName().equals(other.getShortName())) return false; return (getLength() == other.getLength()) && (isUnlimited() == other.isUnlimited()) && (isVariableLength() == other.isVariableLength()) && (isShared() == other.isShared()); }
/** * Instances which have same contents are equal. * Careful!! this is not object identity !! */ @Override public boolean equals(Object oo) { if (this == oo) return true; if (!(oo instanceof Dimension)) return false; Dimension other = (Dimension) oo; Group g = getGroup(); if ((g != null) && !g.equals(other.getGroup())) return false; if ((getShortName() == null) && (other.getShortName() != null)) return false; if ((getShortName() != null) && !getShortName().equals(other.getShortName())) return false; return (getLength() == other.getLength()) && (isUnlimited() == other.isUnlimited()) && (isVariableLength() == other.isVariableLength()) && (isShared() == other.isShared()); }
/** * Instances which have same contents are equal. * Careful!! this is not object identity !! */ @Override public boolean equals(Object oo) { if (this == oo) return true; if (!(oo instanceof Dimension)) return false; Dimension other = (Dimension) oo; Group g = getGroup(); if ((g != null) && !g.equals(other.getGroup())) return false; if ((getShortName() == null) && (other.getShortName() != null)) return false; if ((getShortName() != null) && !getShortName().equals(other.getShortName())) return false; return (getLength() == other.getLength()) && (isUnlimited() == other.isUnlimited()) && (isVariableLength() == other.isVariableLength()) && (isShared() == other.isShared()); }
String dimName = dimension.getFullName(); Group group = dimension.getGroup();
String dimName = dimension.getFullName(); Group group = dimension.getGroup();