Package ucar.nc2
Class Variable.Builder<T extends Variable.Builder<T>>
- java.lang.Object
-
- ucar.nc2.Variable.Builder<T>
-
- Direct Known Subclasses:
Structure.Builder
,VariableDS.Builder
- Enclosing class:
- Variable
public abstract static class Variable.Builder<T extends Variable.Builder<T>> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description ArrayType
dataType
NetcdfFile
ncfile
ProxyReader
proxyReader
String
shortName
Object
spiObject
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Field Detail
-
shortName
public String shortName
-
dataType
public ArrayType dataType
-
ncfile
public NetcdfFile ncfile
-
spiObject
public Object spiObject
-
proxyReader
public ProxyReader proxyReader
-
-
Method Detail
-
getAttributeContainer
public AttributeContainerMutable getAttributeContainer()
-
addDimensions
public T addDimensions(Collection<Dimension> dims)
-
replaceDimensionByName
public boolean replaceDimensionByName(Dimension dim)
Find the dimension with the same name as dim, and replace it with dim
-
replaceDimension
public void replaceDimension(int idx, Dimension dim)
Replace the ith dimension.
-
setDimensionsByName
public T setDimensionsByName(String dimString)
Set dimensions by name. If not empty, the parent group builder must be set.
-
getFirstDimensionName
@Nullable public String getFirstDimensionName()
-
getDimensionName
@Nullable public String getDimensionName(int index)
-
makeDimensionsString
public String makeDimensionsString()
-
setDimensionsAnonymous
public T setDimensionsAnonymous(int[] shape)
Set the dimensions using all anonymous (unshared) dimensions- Parameters:
shape
- defines the dimension lengths. must be > 0, or -1 for VLEN- Throws:
RuntimeException
- if any shape < 1 and not -1.
-
getDimension
public Dimension getDimension(int idx)
-
isUnlimited
public boolean isUnlimited()
-
isVariableLength
public boolean isVariableLength()
-
setIsScalar
public T setIsScalar()
-
getRank
public int getRank()
-
getShape
public int[] getShape()
-
getSize
public long getSize()
-
getEnumTypeName
public String getEnumTypeName()
-
getElementSize
public int getElementSize()
-
setNcfile
public T setNcfile(NetcdfFile ncfile)
-
getFullName
public String getFullName()
-
setParentGroupBuilder
public T setParentGroupBuilder(Group.Builder parent)
-
getParentGroupBuilder
public Group.Builder getParentGroupBuilder()
-
getParentStructureBuilder
public Structure.Builder<?> getParentStructureBuilder()
-
setProxyReader
public T setProxyReader(ProxyReader proxy)
-
setAutoGen
public T setAutoGen(double start, double incr)
-
resetAutoGen
public T resetAutoGen()
-
resetCache
public T resetCache()
-
setIsCaching
public T setIsCaching(boolean caching)
-
makeSliceBuilder
public Variable.Builder<?> makeSliceBuilder(int dim, int index)
Create a new Variable.Builder that is a logical slice of this one, by fixing the specified dimension at the specified index value.- Parameters:
dim
- which dimension to fixindex
- at what index value
-
copy
public Variable.Builder<?> copy()
-
copyFrom
public T copyFrom(Variable.Builder<?> builder)
-
-