|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.Dimension
public final class Dimension
A dimension of a HyperArray - a set of non-negative integers (or identifiers
mapped to non-negative integers) that are used as indexes in hyper arrays.
An index cannot be included in a dimension more than once.
A dimension can be a sub-dimension of another dimension, in this case it
contains a subset (or maybe a full set) of the super dimension indexes.
The top level dimension in the dimension hierarchy does not have a super-
dimension.
Optionally, you can provide names for indexes at a top-level dimension.
| Field Summary | |
|---|---|
int[] |
indexes
An array of indexes included in this dimension. |
| Constructor Summary | |
|---|---|
Dimension(java.lang.String name,
Dimension superdim,
int... indexes)
Deprecated. this method is obsolete and will be removed in the next release! Please use Dimension(String, String, Dimension, int...) instead |
|
Dimension(java.lang.String name,
int... indexes)
Deprecated. this method is obsolete and will be removed in the next release! Please use Dimension(String, String, int...) instead |
|
Dimension(java.lang.String name,
int[] indexes,
java.lang.String[] indexnames)
Deprecated. this method is obsolete and will be removed in the next release! Please use Dimension(String, String, int[], String[]) instead |
|
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. |
|
| Method Summary | |
|---|---|
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. |
int |
size()
Returns the number of indexes in the dimension. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final transient int[] indexes
| Constructor Detail |
|---|
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"
@Deprecated
public Dimension(java.lang.String name,
int... indexes)
Dimension(String, String, int...) instead
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 index
public Dimension(java.lang.String name,
int[] indexes,
java.lang.String[] indexnames)
Dimension(String, String, int[], String[]) instead
public 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"
public Dimension(java.lang.String name,
Dimension superdim,
int... indexes)
Dimension(String, String, Dimension, int...) instead
| Method Detail |
|---|
public java.lang.String getName()
public int size()
public Dimension getSuperDimension()
public int getIndexPosition(int ind)
ind - the index
public java.lang.String getIndexName(int ind)
ind - the index
public 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 dimension
public 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 index
0...size() - 1),
or -1 if not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||