public class TicLabelMap extends Object implements TicLabelFormat
The map description is a list of conditions separated by ';'. The conditions are tested from left to right until a condition is fulfilled for the tic value. If no condition is fullfilled a '?' will be returned.
A condition description has one of the following forms:
<label>
<number>=<label>
<number1>:<number2>=<label>
The first type of condition is always fulfilled. It will return <label>. This is a kind of else condtion which is put at the end of the condition list.
The second form maps a particular number onto a label. In order to be equal with the sepcified number the tic value should not deviate more than 1 ppm (part per millions) from <number>.
The third form maps an interval onto a label. The condition reads
<number1> <= tic label < <number2>
Examples:
1=monday;2=tuesday;3=wednesday;4=thursday;5=friday;6=saturday;7=sunday 0.5:1.5=I; 1.5:2.5 = II; 2.5:3.5 = III; the rest
Constructor and Description |
---|
TicLabelMap(ConfigParameters config)
Creates an instance from the specified configuration parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
form(double ticValue)
Maps the specified tic value onto a text label in accordance
with the map description.
|
public static final String MAP_KEY
public TicLabelMap(ConfigParameters config)
Key & Default Value | Type | Mandatory | Description |
---|---|---|---|
map | String | yes | Map description as explained above. |
public String form(double ticValue)
form
in interface TicLabelFormat
Copyright © 2015. All Rights Reserved.