Class StackArrangement
Object
StackArrangement
- All Implemented Interfaces:
Iterable<BoundingBoxEnclosed>
A list of
BoundingBox
es that indicate where to locate corresponding Stack
s on a
unified larger image.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionStackArrangement
(Extent extent) Create with the overallExtent
and no boxes.StackArrangement
(Extent extent, List<BoundingBoxEnclosed> boxes) Creates a newStackArrangement
instance.StackArrangement
(Extent extent, BoundingBox box) Create with a singleBoundingBox
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(BoundingBoxEnclosed box) Adds a newBoundingBoxEnclosed
to the arrangement.void
add
(BoundingBox box) Adds a newBoundingBox
to the arrangement, with no padding.boxes()
Where to locate a respective image on a larger image.boolean
extent()
The size of the larger image in which all theBoundingBox
es inlist
must fully reside.get
(int index) Gets theBoundingBox
corresponding to a particular index.int
hashCode()
iterator()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StackArrangement
Create with the overallExtent
and no boxes.- Parameters:
extent
- the size of the larger image in which all theBoundingBox
es inlist
must fully reside.
-
StackArrangement
Create with a singleBoundingBox
.- Parameters:
extent
- the size of the larger image in which all theBoundingBox
es inlist
must fully reside.box
- theBoundingBox
.
-
StackArrangement
Creates a newStackArrangement
instance.- Parameters:
extent
- The size of the larger image in which all theBoundingBox
es inlist
must fully reside.boxes
- Where to locate a respective image on a larger image.
-
-
Method Details
-
add
Adds a newBoundingBox
to the arrangement, with no padding.- Parameters:
box
- theBoundingBox
in which the image should be placed.
-
add
Adds a newBoundingBoxEnclosed
to the arrangement.- Parameters:
box
- theBoundingBox
in which the image should be placed, together with any enclosing box (e.g. with padding).
-
get
Gets theBoundingBox
corresponding to a particular index.- Parameters:
index
- the index.- Returns:
- the corresponding
BoundingBox
in the arrangement, and any enclosing bounding-box. - Throws:
IndexOutOfBoundsException
- if the index is out of range.
-
iterator
- Specified by:
iterator
in interfaceIterable<BoundingBoxEnclosed>
-
extent
The size of the larger image in which all theBoundingBox
es inlist
must fully reside. -
boxes
Where to locate a respective image on a larger image. -
equals
-
hashCode
public int hashCode() -
toString
-