org.kite9.diagram.position
Class CostedDimension
java.lang.Object
java.awt.geom.Dimension2D
java.awt.Dimension
org.kite9.diagram.position.Dimension2D
org.kite9.diagram.position.CostedDimension
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<CostedDimension>
public class CostedDimension
- extends Dimension2D
- implements Comparable<CostedDimension>
This extends the idea of dimension, but allows you to associate a cost with the dimension
other than simply the size.
- Author:
- robmoffat
- See Also:
- Serialized Form
| Methods inherited from class org.kite9.diagram.position.Dimension2D |
add, divide, equals, getHeight, getSize, getWidth, increaseX, increaseY, minus, multiply, multiply, roundUpTo, setSize, setSize, setSize, setX, setY, toString, x, y |
ZERO
public static final CostedDimension ZERO
NOT_DISPLAYABLE
public static final CostedDimension NOT_DISPLAYABLE
UNBOUNDED
public static final CostedDimension UNBOUNDED
cost
public long cost
CostedDimension
public CostedDimension()
CostedDimension
public CostedDimension(Dimension2D d)
CostedDimension
public CostedDimension(double arg0,
double arg1,
long cost)
CostedDimension
public CostedDimension(double width,
double height,
Dimension2D within)
- Works out cost based on how well the new
CostedDimension fits into within.
getCost
public long getCost()
setCost
public void setCost(int cost)
chooseBest
public static CostedDimension chooseBest(CostedDimension a,
CostedDimension b)
compareTo
public int compareTo(CostedDimension o)
- Specified by:
compareTo in interface Comparable<CostedDimension>
Copyright © 2011. All Rights Reserved.