org.apache.fop.traits
public class MinOptMax extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
int |
max |
int |
min
Publicly visible min(imum), opt(imum) and max(imum) values.
|
int |
opt |
| Constructor and Description |
|---|
MinOptMax()
New min/opt/max with zero values.
|
MinOptMax(int val)
New min/opt/max with one fixed value.
|
MinOptMax(int min,
int opt,
int max)
New min/opt/max with the three values.
|
MinOptMax(MinOptMax op)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int len)
Adds a length to all components.
|
void |
add(int min,
int opt,
int max)
Adds min, opt and max to their counterpart components.
|
void |
add(MinOptMax op)
Adds another MinOptMax instance to this one.
|
static MinOptMax |
add(MinOptMax op1,
MinOptMax op2)
Adds one MinOptMax instance to another returning a new one.
|
java.lang.Object |
clone() |
boolean |
isElastic() |
boolean |
isNonZero() |
static MinOptMax |
multiply(MinOptMax op1,
double mult)
Multiplies a MinOptMax instance with a factor returning a new instance.
|
void |
subtract(MinOptMax op)
Subtracts another MinOptMax instance from this one.
|
static MinOptMax |
subtract(MinOptMax op1,
MinOptMax op2)
Subtracts one MinOptMax instance from another returning a new one.
|
java.lang.String |
toString() |
public int min
public int opt
public int max
public MinOptMax()
public MinOptMax(int val)
val - the value for min, opt and maxpublic MinOptMax(int min,
int opt,
int max)
min - the minimum valueopt - the optimum valuemax - the maximum valuepublic MinOptMax(MinOptMax op)
op - the MinOptMax object to copypublic java.lang.Object clone()
clone in class java.lang.Objectpublic static MinOptMax subtract(MinOptMax op1, MinOptMax op2)
op1 - first instance to subtract fromop2 - second instancepublic static MinOptMax add(MinOptMax op1, MinOptMax op2)
op1 - first instanceop2 - second instancepublic static MinOptMax multiply(MinOptMax op1, double mult)
op1 - MinOptMax instancemult - multiplierpublic void add(MinOptMax op)
op - the other instancepublic void add(int min,
int opt,
int max)
min - the value to add to the minimum valueopt - the value to add to the optimum valuemax - the value to add to the maximum valuepublic void add(int len)
len - the length to addpublic void subtract(MinOptMax op)
op - the other instancepublic boolean isNonZero()
public boolean isElastic()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright 1999-2008 The Apache Software Foundation. All Rights Reserved.