Class StackArrangement
Object
StackArrangement
- All Implemented Interfaces:
Iterable<BoundingBoxEnclosed>
A list of
BoundingBoxes that indicate where to locate corresponding Stacks on a
unified larger image.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionStackArrangement(Extent extent) Create with the overallExtentand no boxes.StackArrangement(Extent extent, List<BoundingBoxEnclosed> boxes) Creates a newStackArrangementinstance.StackArrangement(Extent extent, BoundingBox box) Create with a singleBoundingBox. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BoundingBoxEnclosed box) Adds a newBoundingBoxEnclosedto the arrangement.voidadd(BoundingBox box) Adds a newBoundingBoxto the arrangement, with no padding.boxes()Where to locate a respective image on a larger image.booleanextent()The size of the larger image in which all theBoundingBoxes inlistmust fully reside.get(int index) Gets theBoundingBoxcorresponding to a particular index.inthashCode()iterator()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StackArrangement
Create with the overallExtentand no boxes.- Parameters:
extent- the size of the larger image in which all theBoundingBoxes inlistmust fully reside.
-
StackArrangement
Create with a singleBoundingBox.- Parameters:
extent- the size of the larger image in which all theBoundingBoxes inlistmust fully reside.box- theBoundingBox.
-
StackArrangement
Creates a newStackArrangementinstance.- Parameters:
extent- The size of the larger image in which all theBoundingBoxes inlistmust fully reside.boxes- Where to locate a respective image on a larger image.
-
-
Method Details
-
add
Adds a newBoundingBoxto the arrangement, with no padding.- Parameters:
box- theBoundingBoxin which the image should be placed.
-
add
Adds a newBoundingBoxEnclosedto the arrangement.- Parameters:
box- theBoundingBoxin which the image should be placed, together with any enclosing box (e.g. with padding).
-
get
Gets theBoundingBoxcorresponding to a particular index.- Parameters:
index- the index.- Returns:
- the corresponding
BoundingBoxin the arrangement, and any enclosing bounding-box. - Throws:
IndexOutOfBoundsException- if the index is out of range.
-
iterator
- Specified by:
iteratorin interfaceIterable<BoundingBoxEnclosed>
-
extent
The size of the larger image in which all theBoundingBoxes inlistmust fully reside. -
boxes
Where to locate a respective image on a larger image. -
equals
-
hashCode
public int hashCode() -
toString
-