@Test public void testWriteCDL() { Dimension dim = Dimension.builder().setName("name").setLength(7).build(); assertThat(dim.toString()).isEqualTo("name = 7;");; }
void writeCDL(Formatter out, Indent indent, boolean strict) { String name = strict ? NetcdfFiles.makeValidCDLName(getShortName()) : getShortName(); out.format("%s%s", indent, name); if (isUnlimited()) out.format(" = UNLIMITED; else if (isVariableLength()) out.format(" = UNKNOWN;"); else out.format(" = %d;", getLength()); }
Dimension implements Comparable<Dimension> { void writeCDL(Formatter out, Indent indent, boolean strict) { String name = strict ? NetcdfFiles.makeValidCDLName(getShortName()) : getShortName(); out.format("%s%s", indent, name); if (isUnlimited()) out.format(" = UNLIMITED; else if (isVariableLength()) out.format(" = UNKNOWN;"); else out.format(" = %d;", getLength()); } }
Dimension implements Comparable<Dimension> { void writeCDL(Formatter out, Indent indent, boolean strict) { String name = strict ? NetcdfFiles.makeValidCDLName(getShortName()) : getShortName(); out.format("%s%s", indent, name); if (isUnlimited()) out.format(" = UNLIMITED; else if (isVariableLength()) out.format(" = UNKNOWN;"); else out.format(" = %d;", getLength()); } Dimension(String name, int length);  Dimension(String name, int length, boolean isShared, boolean isUnlimited, boolean isVariableLength); private  Dimension(Builder builder); }
Dimension implements Comparable<Dimension> { void writeCDL(Formatter out, Indent indent, boolean strict) { String name = strict ? NetcdfFiles.makeValidCDLName(getShortName()) : getShortName(); out.format("%s%s", indent, name); if (isUnlimited()) out.format(" = UNLIMITED; else if (isVariableLength()) out.format(" = UNKNOWN;"); else out.format(" = %d;", getLength()); } Dimension(String name, int length);  Dimension(String name, int length, boolean isShared, boolean isUnlimited, boolean isVariableLength); private  Dimension(Builder builder); int getLength(); String getShortName(); boolean isUnlimited(); boolean isVariableLength(); boolean isShared(); String makeFullName(Variable v); String makeFullName(Group containingGroup); @Override boolean equals(Object o); @Override int hashCode(); int compareTo(Dimension odim); @Override String toString(); Builder toBuilder(); static Builder builder(); static Builder builder(String name, int length); }
Dimension implements Comparable<Dimension> { void writeCDL(Formatter out, Indent indent, boolean strict) { String name = strict ? NetcdfFiles.makeValidCDLName(getShortName()) : getShortName(); out.format("%s%s", indent, name); if (isUnlimited()) out.format(" = UNLIMITED; else if (isVariableLength()) out.format(" = UNKNOWN;"); else out.format(" = %d;", getLength()); } Dimension(String name, int length);  Dimension(String name, int length, boolean isShared, boolean isUnlimited, boolean isVariableLength); private  Dimension(Builder builder); int getLength(); String getShortName(); boolean isUnlimited(); boolean isVariableLength(); boolean isShared(); String makeFullName(Variable v); String makeFullName(Group containingGroup); @Override boolean equals(Object o); @Override int hashCode(); int compareTo(Dimension odim); @Override String toString(); Builder toBuilder(); static Builder builder(); static Builder builder(String name, int length); static final Dimension VLEN; }