public class Dimensions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Dimensions.FindDimensionByName
A Function that finds a Dimension by name.
|
Modifier and Type | Method and Description |
---|---|
static long |
getSize(java.lang.Iterable<Dimension> dimensions)
Get the total number of elements the dimensions represent.
|
static com.google.common.collect.ImmutableList<Dimension> |
makeDimensionsAll(Variable v)
Get list of Dimensions, including parent Structure(s), if any.
|
static com.google.common.collect.ImmutableList<Dimension> |
makeDimensionsAnon(int[] shape)
Make a list of private dimensions from an array of lengths
|
static com.google.common.collect.ImmutableList<Dimension> |
makeDimensionsList(Dimensions.FindDimensionByName finder,
java.lang.String dimString)
Make a list of Dimensions from a list of names.
|
static java.lang.String |
makeDimensionsString(java.util.List<Dimension> dimensions)
Make a space-delineated String from a list of Dimension names, inverse of makeDimensionsList().
|
static Section.Builder |
makeSectionFromDimensions(java.lang.Iterable<Dimension> dimensions)
Make a ucar.ma2.Section.Builder from an ordered set of Dimension objects.
|
static int[] |
makeShape(java.lang.Iterable<Dimension> dimensions)
Make an array of Dimension lengths.
|
public static long getSize(java.lang.Iterable<Dimension> dimensions)
public static com.google.common.collect.ImmutableList<Dimension> makeDimensionsAll(Variable v)
public static com.google.common.collect.ImmutableList<Dimension> makeDimensionsAnon(int[] shape)
public static com.google.common.collect.ImmutableList<Dimension> makeDimensionsList(Dimensions.FindDimensionByName finder, java.lang.String dimString) throws java.lang.IllegalArgumentException
finder
- interface to find a Dimension by name.dimString
- space separated list of dimension names.java.lang.IllegalArgumentException
- if cant find or parse the name.public static java.lang.String makeDimensionsString(java.util.List<Dimension> dimensions)
public static Section.Builder makeSectionFromDimensions(java.lang.Iterable<Dimension> dimensions)
public static int[] makeShape(java.lang.Iterable<Dimension> dimensions)