/** @see java.lang.Object#hashCode() */ @Override public int hashCode() { return getSource().hashCode() + getOutput().hashCode() + getDimensions().hashCode(); } }
/** @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object other) { return other instanceof ExtraVariable && getSource().equals(((ExtraVariable) other).getSource()) && getOutput().equals(((ExtraVariable) other).getOutput()) && getDimensions().equals(((ExtraVariable) other).getDimensions()); }
List<NetCDFSettingsContainer.ExtraVariable> scalarExtraVariables = new ArrayList<>(); for (NetCDFSettingsContainer.ExtraVariable extra : extraVariables) { if (extra.getDimensions().isEmpty()) { scalarExtraVariables.add(extra); } else { if (extra.getDimensions().equals(dimName[dimensionIndex])) { nonscalarExtraVariables.add( new ExtraVariableRecord(extra, dimensionIndex));
"Extra variable output '%s' already exists", extra.getOutput())); } else if (extra.getDimensions().split("\\s").length > 1) { LOGGER.info( String.format( "Extra variable output '%s' " + "has too many dimensions '%s'", extra.getOutput(), extra.getDimensions())); } else { Variable outputVar = extra.getOutput(), sourceVar.getDataType(), extra.getDimensions()); for (Attribute att : sourceVar.getAttributes()) { writer.addVariableAttribute(outputVar, att);
"Extra variable output '%s' already exists", extra.getOutput())); } else if (extra.getDimensions().split("\\s").length > 1) { LOGGER.info( String.format( "Extra variable output '%s' " + "has too many dimensions '%s'", extra.getOutput(), extra.getDimensions())); } else { Variable outputVar = extra.getOutput(), sourceVar.getDataType(), extra.getDimensions()); for (Attribute att : sourceVar.getAttributes()) { writer.addVariableAttribute(outputVar, att);
assertEquals( "forecast_reference_time", actualContainer.getExtraVariables().get(0).getOutput()); assertEquals("time", actualContainer.getExtraVariables().get(0).getDimensions());