blob: 2adcdf2c787e5be7a5536420a2af26add6e88a64 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package org.uic.barcode.ticket.api.utils;
import org.uic.barcode.ticket.EncodingFormatException;
public class NumWrapper {
private String ia5string = null;
private Long number = null;
public NumWrapper(String string, int min, int max) throws EncodingFormatException {
if (string == null || string.isEmpty()) {
return;
}
ia5string = UicEncoderUtils.getIA5RestrictedNonNum (string,min,max);
if (ia5string == null || ia5string.length() == 0) {
number = UicEncoderUtils.getRestrictedNum (string,min,max);
}
if (ia5string != null && ia5string.length() == 0) {
ia5string = null;
}
return;
}
public String getString() {
return ia5string;
}
public Long getNumber() {
return number;
}
}
|