@Test public void testBuilder() { Variable var = Variable.builder().setName("name").setDataType(DataType.FLOAT).build(makeDummyGroup()); assertThat(var.getDataType()).isEqualTo(DataType.FLOAT); assertThat(var.getShortName()).isEqualTo("name"); assertThat(var.isScalar()).isTrue(); assertThat(var.getElementSize()).isEqualTo(4); assertThat(var.getSize()).isEqualTo(1); assertThat(var.getDatasetLocation()).isEqualTo("N/A"); assertThat(var.isMetadata()).isEqualTo(false); assertThat(var.isUnlimited()).isEqualTo(false); assertThat(var.isVariableLength()).isEqualTo(false); }
public static Builder<?> builder() { return new Builder2(); }
Variable implements VariableSimpleIF, ProxyReader { public static Builder<?> builder() { return new Builder2(); } }
Variable implements VariableSimpleIF, ProxyReader { public static Builder<?> builder() { return new Builder2(); } protected  Variable(Builder<?> builder, Group parentGroup); }
Variable implements VariableSimpleIF, ProxyReader { public static Builder<?> builder() { return new Builder2(); } protected  Variable(Builder<?> builder, Group parentGroup); int findDimensionIndex(String name); String getDatasetLocation(); DataType getDataType(); String getDescription(); ImmutableList<Dimension> getDimensions(); Dimension getDimension(int i); String getDimensionsString(); int getElementSize(); @Nullable EnumTypedef getEnumTypedef(); @Nullable String getFileTypeId(); String getFullName(); @Nullable NetcdfFile getNetcdfFile(); Group getParentGroup(); @Nullable Structure getParentStructure(); ImmutableList<Range> getRanges(); int getRank(); int[] getShape(); int getShape(int index); Section getShapeAsSection(); String getShortName(); long getSize(); @Nullable String getUnitsString(); boolean isCoordinateVariable(); boolean isMemberOfStructure(); boolean isMetadata(); boolean isScalar(); boolean isUnlimited(); boolean isVariableLength(); @Nullable String lookupEnumString(int val); Variable section(List<Range> ranges); Variable section(Section subsection); Variable slice(int dim, int value); Variable reduce(List<Dimension> dims); long readToStream(Section section, OutputStream out); @Deprecated Array read(int[] origin, int[] shape); @Deprecated Array read(String sectionSpec); @Deprecated Array read(List<Range> ranges); @Deprecated Array read(ucar.ma2.Section section); @Deprecated Array read(); @Deprecated byte readScalarByte(); @Deprecated short readScalarShort(); @Deprecated int readScalarInt(); @Deprecated long readScalarLong(); @Deprecated float readScalarFloat(); @Deprecated double readScalarDouble(); @Deprecated String readScalarString(); ucar.array.Array<?> readArray(); ucar.array.Array<?> readArray(ucar.ma2.Section section); @Override @Deprecated Array reallyRead(Variable client, CancelTask cancelTask); @Override ucar.array.Array<?> proxyReadArray(Variable client, CancelTask cancelTask); @Override @Deprecated Array reallyRead(Variable client, Section section, CancelTask cancelTask); @Override ucar.array.Array<?> proxyReadArray(Variable client, Section section, CancelTask cancelTask); String getNameAndDimensions(); void getNameAndDimensions(Formatter buf, boolean useFullName, boolean strict); String toString(); String toStringDebug(); @Override boolean equals(Object oo); @Override int hashCode(); int compareTo(VariableSimpleIF o); @Override AttributeContainer attributes(); @Nullable Attribute findAttribute(String name); String findAttributeString(String attName, String defaultValue); @Deprecated void resetShape(); Object getSPobject(); int getSizeToCache(); void setCaching(boolean caching); boolean isCaching(); void invalidateCache(); boolean hasCachedData(); Builder<?> toBuilder(); static Builder<?> builder(); }
Variable implements VariableSimpleIF, ProxyReader { public static Builder<?> builder() { return new Builder2(); } protected  Variable(Builder<?> builder, Group parentGroup); int findDimensionIndex(String name); String getDatasetLocation(); DataType getDataType(); String getDescription(); ImmutableList<Dimension> getDimensions(); Dimension getDimension(int i); String getDimensionsString(); int getElementSize(); @Nullable EnumTypedef getEnumTypedef(); @Nullable String getFileTypeId(); String getFullName(); @Nullable NetcdfFile getNetcdfFile(); Group getParentGroup(); @Nullable Structure getParentStructure(); ImmutableList<Range> getRanges(); int getRank(); int[] getShape(); int getShape(int index); Section getShapeAsSection(); String getShortName(); long getSize(); @Nullable String getUnitsString(); boolean isCoordinateVariable(); boolean isMemberOfStructure(); boolean isMetadata(); boolean isScalar(); boolean isUnlimited(); boolean isVariableLength(); @Nullable String lookupEnumString(int val); Variable section(List<Range> ranges); Variable section(Section subsection); Variable slice(int dim, int value); Variable reduce(List<Dimension> dims); long readToStream(Section section, OutputStream out); @Deprecated Array read(int[] origin, int[] shape); @Deprecated Array read(String sectionSpec); @Deprecated Array read(List<Range> ranges); @Deprecated Array read(ucar.ma2.Section section); @Deprecated Array read(); @Deprecated byte readScalarByte(); @Deprecated short readScalarShort(); @Deprecated int readScalarInt(); @Deprecated long readScalarLong(); @Deprecated float readScalarFloat(); @Deprecated double readScalarDouble(); @Deprecated String readScalarString(); ucar.array.Array<?> readArray(); ucar.array.Array<?> readArray(ucar.ma2.Section section); @Override @Deprecated Array reallyRead(Variable client, CancelTask cancelTask); @Override ucar.array.Array<?> proxyReadArray(Variable client, CancelTask cancelTask); @Override @Deprecated Array reallyRead(Variable client, Section section, CancelTask cancelTask); @Override ucar.array.Array<?> proxyReadArray(Variable client, Section section, CancelTask cancelTask); String getNameAndDimensions(); void getNameAndDimensions(Formatter buf, boolean useFullName, boolean strict); String toString(); String toStringDebug(); @Override boolean equals(Object oo); @Override int hashCode(); int compareTo(VariableSimpleIF o); @Override AttributeContainer attributes(); @Nullable Attribute findAttribute(String name); String findAttributeString(String attName, String defaultValue); @Deprecated void resetShape(); Object getSPobject(); int getSizeToCache(); void setCaching(boolean caching); boolean isCaching(); void invalidateCache(); boolean hasCachedData(); Builder<?> toBuilder(); static Builder<?> builder(); static boolean permitCaching; }