|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.portico.shared.model.Extent
public class Extent
All the below relates to HLA 1.3
Extent
is a construct used for DDM. Extents are created and populated at runtime
(much like ACInstances) and are not metadata/fom data (like ACMetadatas).
The DDM constructs for Portico are defined as follows:
A Space
is a metadata type that is defined within the FOM
Each Space
defines a number of Dimension
s that it consists of.
(the Dimension class is also a metadata class).
A RegionInstance
is defined at runtime. Each Region is associated with a
SINGLE Space
A RegionInstance
contains a number of Extent
s. Each Extent
defines a bound (a minimum and maximum value) for each Dimension
in the Space
associated with the RegionInstance
it is contained in.
Confused yet? Yeah, I was as well. Wait until you deal with 1516.
Nested Class Summary | |
---|---|
class |
Extent.Range
A Range is a structure that contains an upper and lower bound for a specific Dimension . |
Field Summary | |
---|---|
private Map<Integer,Extent.Range> |
ranges
|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
private |
Extent()
This constructor is only for use during the cloning process in clone() . |
|
Extent(Space space)
|
Method Summary | |
---|---|
private void |
checkDimension(int dimension)
The 1.3 spec says that if there is no dimension in the extent for a requested action, an ArrayIndexOutOfBounds exception should be thrown. |
protected Extent |
clone()
This method will create a full copy of the current Extent and return it. |
Map<Integer,Extent.Range> |
getAllRanges()
Return the map containing all the range values for this extent. |
Extent.Range |
getRange(Dimension dimension)
Returns the Extent.Range contained within this Extent for the given
Dimension . |
Extent.Range |
getRange(int dimensionHandle)
Returns the Extent.Range contained within this Extent for the given
dimension handle. |
long |
getRangeLowerBound(int dimensionHandle)
Fetches the lower bound for the range associated with the given dimension in this extent and returns it. |
long |
getRangeUpperBound(int dimensionHandle)
Fetches the upper bound for the range associated with the given dimension in this extent and returns it. |
boolean |
overlapsWith(Extent otherExtent)
Returns true if the ranges for all dimensions in this Extent overlap
with the ranges for all the dimensions in the other Extent . |
void |
setRange(Dimension dimension,
Extent.Range range)
Sets the Extent.Range for the given Dimension in this Extent . |
void |
setRange(int dimensionHandle,
Extent.Range range)
Sets the Extent.Range for the given dimension handle in this Extent . |
void |
setRangeLowerBound(int dimensionHandle,
long lowerBound)
Sets the lower bound for the range associated with the given dimension in this extent. |
void |
setRangeUpperBound(int dimensionHandle,
long upperBound)
Sets the upper bound for the range associated with the given dimension in this extent. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private Map<Integer,Extent.Range> ranges
Constructor Detail |
---|
public Extent(Space space)
private Extent()
clone()
.
It doesn't require the Space
as it doesn't need to create its ranges for
the set of dimensions. Rather, the cloning process will copy the existing set.
Method Detail |
---|
protected Extent clone()
Extent
and return it. It is
used by the RegionInstance.clone()
method.
clone
in class Object
public boolean overlapsWith(Extent otherExtent)
true
if the ranges for all dimensions in this Extent
overlap
with the ranges for all the dimensions in the other Extent
.
public Extent.Range getRange(Dimension dimension)
Extent.Range
contained within this Extent
for the given
Dimension
. If none exists, null is returned.
public void setRange(Dimension dimension, Extent.Range range)
Extent.Range
for the given Dimension
in this Extent
. If the
given Dimension
or Extent.Range
is null, no action is taken and nothing will
be added.
public Map<Integer,Extent.Range> getAllRanges()
private void checkDimension(int dimension) throws JArrayIndexOutOfBounds
JArrayIndexOutOfBounds
public Extent.Range getRange(int dimensionHandle) throws JArrayIndexOutOfBounds
Extent.Range
contained within this Extent
for the given
dimension handle. If none exists, a JArrayIndexOutOfBounds
is thrown.
JArrayIndexOutOfBounds
public void setRange(int dimensionHandle, Extent.Range range) throws JArrayIndexOutOfBounds
Extent.Range
for the given dimension handle in this Extent
. If the
given Extent.Range
is null, no action is taken and nothing will be added. If the dimension
handle does not represent a dimension in the extent, a JArrayIndexOutOfBounds
is
thrown.
JArrayIndexOutOfBounds
public long getRangeUpperBound(int dimensionHandle) throws JArrayIndexOutOfBounds
JArrayIndexOutOfBounds
will be thrown.
JArrayIndexOutOfBounds
public long getRangeLowerBound(int dimensionHandle) throws JArrayIndexOutOfBounds
JArrayIndexOutOfBounds
will be thrown.
JArrayIndexOutOfBounds
public void setRangeUpperBound(int dimensionHandle, long upperBound) throws JArrayIndexOutOfBounds
JArrayIndexOutOfBounds
will be thrown.
There is no checking of the bound value, you can set an invalid value if you wish.
JArrayIndexOutOfBounds
public void setRangeLowerBound(int dimensionHandle, long lowerBound) throws JArrayIndexOutOfBounds
JArrayIndexOutOfBounds
will be thrown.
There is no checking of the bound value, you can set an invalid value if you wish.
JArrayIndexOutOfBounds
|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |