78
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2007 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 ******************************************************************************/
|
|
11
|
|
12 module org.eclipse.core.internal.databinding.validation.NumberFormatConverter;
|
|
13
|
|
14 import java.lang.all;
|
|
15
|
|
16 import org.eclipse.core.databinding.conversion.Converter;
|
|
17
|
|
18 import com.ibm.icu.text.NumberFormat;
|
|
19
|
|
20 /**
|
|
21 * Converter that uses a number format for conversion.
|
|
22 *
|
|
23 * @since 1.0
|
|
24 */
|
|
25 public abstract class NumberFormatConverter : Converter {
|
|
26 private final NumberFormat numberFormat;
|
|
27
|
|
28 /**
|
|
29 * @param fromType
|
|
30 * @param toType
|
|
31 * @param numberFormat
|
|
32 */
|
|
33 public this(Object fromType, Object toType, NumberFormat numberFormat) {
|
|
34 super(fromType, toType);
|
|
35
|
|
36 this.numberFormat = numberFormat;
|
|
37 }
|
|
38
|
|
39 /**
|
|
40 * @return number format
|
|
41 */
|
|
42 /*package */ NumberFormat getNumberFormat() {
|
|
43 return numberFormat;
|
|
44 }
|
|
45 }
|