Modifier and Type | Class and Description |
---|---|
static class |
NumberProperty.Maker
Inner class for making NumberProperty objects
|
static class |
NumberProperty.PositiveIntegerMaker
A positive integer property maker.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Color |
getColor(FOUserAgent foUserAgent)
Convert NumberProperty to a Color.
|
int |
getDimension()
Plain number always has a dimension of 0.
|
static NumberProperty |
getInstance(double num)
Returns the canonical NumberProperty instance
corresponding to the given double
|
static NumberProperty |
getInstance(Double num)
Returns the canonical NumberProperty instance
corresponding to the given Number
|
static NumberProperty |
getInstance(int num)
Returns the canonical NumberProperty instance
corresponding to the given int
|
static NumberProperty |
getInstance(Integer num)
Returns the canonical NumberProperty instance
corresponding to the given Integer
|
Length |
getLength()
This method expects to be overridden by subclasses
|
Number |
getNumber()
This method expects to be overridden by subclasses
|
Numeric |
getNumeric()
Convert NumberProperty to Numeric object
|
double |
getNumericValue()
Return the value of this Numeric.
|
double |
getNumericValue(PercentBaseContext context)
Return the value of this Numeric.
|
Object |
getObject()
This method expects to be overridden by subclasses
|
int |
getValue()
Returns the value of this numeric as an int.
|
int |
getValue(PercentBaseContext context)
Return the value
|
int |
hashCode() |
boolean |
isAbsolute()
Return true because all numbers are absolute.
|
getCharacter, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, getSpace, getSpecifiedValue, getString, isAuto, setSpecifiedValue, toString
public static NumberProperty getInstance(Double num)
num
- the base Doublepublic static NumberProperty getInstance(Integer num)
num
- the base Integerpublic static NumberProperty getInstance(double num)
num
- the base double valuepublic static NumberProperty getInstance(int num)
num
- the base int valuepublic int getDimension()
getDimension
in interface Numeric
public double getNumericValue()
getNumericValue
in interface Numeric
public double getNumericValue(PercentBaseContext context)
getNumericValue
in interface Numeric
context
- Evaluation contextpublic int getValue()
public int getValue(PercentBaseContext context)
public boolean isAbsolute()
isAbsolute
in interface Numeric
public Number getNumber()
Property
public Object getObject()
Property
public Numeric getNumeric()
getNumeric
in class Property
public Length getLength()
public Color getColor(FOUserAgent foUserAgent)
Copyright © 2025 Apache Software Foundation. All rights reserved.