T - The template of the classes that can be added to this Geometrypublic class Geometry<T extends Geometry> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
parallelChildrenCount |
protected int |
parallelPosition |
protected int |
serialChildrenCount |
protected int |
serialPosition |
| Constructor and Description |
|---|
Geometry(String name,
Dimension dimension)
Create a new Geometry with no children.
|
Geometry(String name,
Dimension dimension,
int p,
int s)
Create a new Geometry with a maximum set of components in the (p,s)
coordinate system.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildGeometry(T child,
int p,
int s)
Add a child to the grid to a given position.
|
protected void |
addGeometry(T child,
int x,
int y)
Add a Geometry to this Geometry at a given (x,y) location.
|
protected void |
addGeometryToGrid(T child,
int p,
int s) |
Geometry |
findGeometry(String geometryUniqueId)
Find a Geometry by name.
|
Point |
getAbsolutePoint(Point p) |
T |
getChild(int p,
int s)
Get child at position (p,s).
|
List<T> |
getChildrenList()
Get the list of children for this Geometry.
|
Map<Geometry,Point> |
getChildrenWithAbsoluteCoordinates()
Get the children for this Geometry.
|
Dimension |
getDimension()
Get the Dimension of this Geometry.
|
Point |
getGeometryAbsolutePosition() |
Point |
getGeometryPoint(Geometry geometry)
Get the location Point of a child Geometry within this Geometry.
|
int |
getHeight()
Get the Geometry height;
|
String |
getName()
Get the Geometry name
|
int |
getNumberOfChildren()
Get the number of children in this Geometry.
|
int |
getParallelChildrenCount() |
int |
getParallelPosition() |
Geometry |
getParent()
Get the parent of this Geometry.
|
int |
getSerialChildrenCount() |
int |
getSerialPosition() |
String |
getUniqueId()
Get this Geometry unique id.
|
int |
getWidth()
Get the Geometry width.
|
boolean |
hasChildren()
Check if this Geometry has children.
|
boolean |
hasParent()
Check if this Geometry has a Parent.
|
void |
setParallelPosition(int parallelPosition) |
protected void |
setParent(Geometry parent) |
void |
setSerialPosition(int serialPosition) |
protected final int serialChildrenCount
protected final int parallelChildrenCount
protected int serialPosition
protected int parallelPosition
public Geometry(String name, Dimension dimension, int p, int s)
addGeometryToGrid.name - The name of this Geometrydimension - The dimension of this Geometry. Children must fit within this dimension.p - The number of allowed components in the parallel direction.s - The number of allowed components in the serial directionpublic String getName()
public int getWidth()
public int getHeight()
public Dimension getDimension()
public Geometry getParent()
public boolean hasParent()
protected final void setParent(Geometry parent)
protected void addGeometry(T child, int x, int y)
child - The Geometry to be addedx - The x coordinate of the child Geometry locationy - The y coordinate of the child Geometry locationpublic int getSerialChildrenCount()
public int getParallelChildrenCount()
public int getSerialPosition()
public int getParallelPosition()
public void setSerialPosition(int serialPosition)
public void setParallelPosition(int parallelPosition)
public void addChildGeometry(T child, int p, int s)
child - The child to be addeds - The serial position to add it top - The parallel position to add it toprotected void addGeometryToGrid(T child, int p, int s)
public T getChild(int p, int s)
p - The parallel position to add it tos - The serial position to add it topublic boolean hasChildren()
public final Map<Geometry,Point> getChildrenWithAbsoluteCoordinates()
public final List<T> getChildrenList()
public final String getUniqueId()
public final Geometry findGeometry(String geometryUniqueId)
geometryUniqueId - The unique id of the geometry to be found.public final int getNumberOfChildren()
public Point getGeometryAbsolutePosition()
Copyright © 2016 LSST. All rights reserved.