public final class Dimension
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIMENSIONS_CONTAINER_CLASS_NAME |
int[] |
indexes
An array of indexes included in this dimension.
|
Constructor and Description |
---|
Dimension(java.lang.String packageName,
java.lang.String name,
Dimension superdim,
int... indexes)
Creates a sub-dimension of another dimension.
|
Dimension(java.lang.String packageName,
java.lang.String name,
Dimension superdim,
java.lang.String indexes)
Creates a sub-dimension of another dimension.
|
Dimension(java.lang.String packageName,
java.lang.String name,
int... indexes)
Creates a top-level dimension with a given name and given set of integer
indexes not having names.
|
Dimension(java.lang.String packageName,
java.lang.String name,
int[] indexes,
java.lang.String[] indexnames)
Creates a top-level dimension with a given name and given set of integer
indexes, each having a name.
|
Dimension(java.lang.String packageName,
java.lang.String name,
java.lang.String indexes)
Creates a top-level dimension with a given name and given set of integer
indexes not having names.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndexByName(java.lang.String name)
Returns the index having the specified textual name.
|
int |
getIndexByPosition(int position)
Returns the index having the specified position in this dimension
(from 0 to size()-1).
|
java.lang.String |
getIndexName(int ind)
Returns the textual name of the given index, or its formatted integer
value in case index name is not set.
|
java.lang.String |
getIndexNameByPosition(int position)
Returns the textual name of the index located at the given position,
or formatted integer value of the index in case index name is not set.
|
int |
getIndexPosition(int ind)
Returns the position of an index in this dimension, starting from 0.
|
int |
getIndexPositionByName(java.lang.String name)
Returns the position of the index in this dimension (from 0 to size()-1)
having the specified textual name.
|
java.lang.String |
getName()
Returns the name of the dimension.
|
Dimension |
getSuperDimension()
Returns super-dimension of this dimension or null if this is a top-level dimension.
|
static int[] |
parseRangeIndexes(java.lang.String str)
Deprecated.
|
int |
size()
Returns the number of indexes in the dimension.
|
public static final java.lang.String DIMENSIONS_CONTAINER_CLASS_NAME
public final transient int[] indexes
public Dimension(java.lang.String packageName, java.lang.String name, int... indexes)
packageName
- the name of the model package this dimension belongs toname
- the name of the dimensionindexes
- the set of indexes (nonnegative integers)public Dimension(java.lang.String packageName, java.lang.String name, java.lang.String indexes)
packageName
- the name of the model package this dimension belongs toname
- the name of the dimensionindexes
- the string with a set of ranges and indexes (nonnegative integers),
e.g. "1,3,90-100, 70"
public Dimension(java.lang.String packageName, java.lang.String name, int[] indexes, java.lang.String[] indexnames)
packageName
- the name of the model package this dimension belongs toname
- the name of the dimensionindexes
- the set of indexes (nonnegative integers)indexnames
- index names, a name for each indexpublic Dimension(java.lang.String packageName, java.lang.String name, Dimension superdim, int... indexes)
packageName
- the name of the model package this dimension belongs toname
- the name of the dimensionsuperdim
- the super-dimensionindexes
- the set of indexes (nonnegative integers)public Dimension(java.lang.String packageName, java.lang.String name, Dimension superdim, java.lang.String indexes)
packageName
- the name of the model package this dimension belongs toname
- the name of the dimensionsuperdim
- the super-dimensionindexes
- the string with a set of ranges and indexes (nonnegative integers),
e.g. "1,3,90-100, 70"
@AnyLogicInternalCodegenAPI @Deprecated public static int[] parseRangeIndexes(java.lang.String str)
str
- the range expressionpublic java.lang.String getName()
public int size()
public Dimension getSuperDimension()
public int getIndexPosition(int ind)
ind
- the indexpublic java.lang.String getIndexName(int ind)
ind
- the indexpublic java.lang.String getIndexNameByPosition(int position)
position
- the position of the index (in the range 0...size() - 1
)public int getIndexByPosition(int position)
position
- the position of the index in this dimensionpublic int getIndexByName(java.lang.String name)
name
- the name of the index-1
if not foundpublic int getIndexPositionByName(java.lang.String name)
name
- the name of the index0...size() - 1
),
or -1
if not foundCopyright © AnyLogic North America, LLC. All Rights Reserved.