public abstract static class Variable.Builder<T extends Variable.Builder<T>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
ucar.nc2.Variable.Cache |
cache |
DataType |
dataType |
NetcdfFile |
ncfile |
ProxyReader |
proxyReader |
java.lang.String |
shortName |
java.lang.Object |
spiObject |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
T |
addAttribute(Attribute att) |
T |
addAttributes(java.lang.Iterable<Attribute> atts) |
T |
addDimension(Dimension dim) |
T |
addDimensions(java.util.Collection<Dimension> dims) |
Variable |
build(Group parentGroup)
Normally this is called by Group.build()
|
Variable.Builder<?> |
copy() |
T |
copyFrom(Variable.Builder<?> builder) |
T |
copyFrom(Variable orgVar)
TODO Copy metadata from orgVar.
|
AttributeContainerMutable |
getAttributeContainer() |
java.lang.String |
getDimensionName(int index) |
java.lang.Iterable<java.lang.String> |
getDimensionNames() |
com.google.common.collect.ImmutableList<Dimension> |
getDimensions() |
com.google.common.collect.ImmutableSet<java.lang.String> |
getDimensionsAll() |
int |
getElementSize() |
java.lang.String |
getEnumTypeName() |
java.lang.String |
getFirstDimensionName() |
java.lang.String |
getFullName() |
Group.Builder |
getParentGroupBuilder() |
Structure.Builder<?> |
getParentStructureBuilder() |
int |
getRank() |
java.lang.String |
makeDimensionsString() |
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.
|
boolean |
replaceDimensionByName(Dimension dim)
Find the dimension with the same name as dim, and replace it with dim
|
T |
resetCache() |
T |
setAutoGen(double start,
double incr) |
T |
setCachedData(Array cacheData,
boolean isMetadata) |
T |
setCaching(boolean caching) |
T |
setDataType(DataType dataType) |
T |
setDimensions(java.util.List<Dimension> dims) |
T |
setDimensionsAnonymous(int[] shape)
Set the dimensions using all anonymous (unshared) dimensions
|
T |
setDimensionsByName(java.lang.String dimString)
Set dimensions by name.
|
T |
setElementSize(int elementSize) |
T |
setEnumTypeName(java.lang.String enumTypeName) |
T |
setIsScalar() |
T |
setName(java.lang.String shortName) |
T |
setNcfile(NetcdfFile ncfile) |
T |
setParentGroupBuilder(Group.Builder parent) |
T |
setProxyReader(ProxyReader proxy) |
T |
setSPobject(java.lang.Object spiObject) |
java.lang.String |
toString() |
public ucar.nc2.Variable.Cache cache
public DataType dataType
public NetcdfFile ncfile
public ProxyReader proxyReader
public java.lang.String shortName
public java.lang.Object spiObject
public Variable.Builder<?> copy()
public T copyFrom(Variable.Builder<?> builder)
public AttributeContainerMutable getAttributeContainer()
@Nullable public java.lang.String getDimensionName(int index)
public java.lang.Iterable<java.lang.String> getDimensionNames()
public com.google.common.collect.ImmutableList<Dimension> getDimensions()
public com.google.common.collect.ImmutableSet<java.lang.String> getDimensionsAll()
public int getElementSize()
public java.lang.String getEnumTypeName()
@Nullable public java.lang.String getFirstDimensionName()
public java.lang.String getFullName()
public Group.Builder getParentGroupBuilder()
public Structure.Builder<?> getParentStructureBuilder()
public int getRank()
public java.lang.String makeDimensionsString()
public Variable.Builder<?> makeSliceBuilder(int dim, int index)
dim
- which dimension to fixindex
- at what index valuepublic boolean replaceDimensionByName(Dimension dim)
public T resetCache()
public T setAutoGen(double start, double incr)
public T setCaching(boolean caching)
public T setDimensionsAnonymous(int[] shape)
shape
- defines the dimension lengths. must be > 0, or -1 for VLENjava.lang.RuntimeException
- if any shape < 1 and not -1.public T setDimensionsByName(java.lang.String dimString)
public T setElementSize(int elementSize)
public T setEnumTypeName(java.lang.String enumTypeName)
public T setIsScalar()
public T setName(java.lang.String shortName)
public T setNcfile(NetcdfFile ncfile)
public T setParentGroupBuilder(Group.Builder parent)
public T setProxyReader(ProxyReader proxy)
public T setSPobject(java.lang.Object spiObject)
public java.lang.String toString()
toString
in class java.lang.Object