class Units extends AnyRef
Formats values with a unit of measure. Output is intended for use with Apache FOP.
Instances of this class are thread-safe.
- Alphabetic
- By Inheritance
- Units
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Units(label: String, precision: Int)
Creates a new instance.
Creates a new instance.
- label
units label to append when formatting a value
- precision
number of decimal places to display when formatting a value
- Exceptions thrown
`IllegalArgumentException`
ifprecision
is negative
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
format(value: Int): String
Formats
value
, displaying it withprecision
decimal places and appendinglabel
(e.g., "1.0cm
").Formats
value
, displaying it withprecision
decimal places and appendinglabel
(e.g., "1.0cm
").- value
value to format
- returns
value
, formatted
-
def
format(value: Double): String
Formats
value
, displaying it withprecision
decimal places and appendinglabel
(e.g., "1.2cm
").Formats
value
, displaying it withprecision
decimal places and appendinglabel
(e.g., "1.2cm
").- value
value to format
- returns
value
, formatted
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Click here to explore the PlayFOP Scaladoc.