Github user solzy commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/275#discussion_r145639624
  
    --- Diff: 
phoenix-core/src/main/java/com/ibm/icu/impl/jdkadapter/NumberFormatICU.java ---
    @@ -0,0 +1,229 @@
    +// © 2016 and later: Unicode, Inc. and others.
    +// License & terms of use: http://www.unicode.org/copyright.html#License
    +/*
    + 
*******************************************************************************
    + * Copyright (C) 2008, International Business Machines Corporation and     
    *
    + * others. All Rights Reserved.                                            
    *
    + 
*******************************************************************************
    + */
    +package com.ibm.icu.impl.jdkadapter;
    +
    +import java.math.RoundingMode;
    +import java.text.FieldPosition;
    +import java.text.ParseException;
    +import java.text.ParsePosition;
    +import java.util.Currency;
    +
    +import com.ibm.icu.impl.icuadapter.NumberFormatJDK;
    +import com.ibm.icu.text.NumberFormat;
    +
    +/**
    + * NumberFormatICU is an adapter class which wraps ICU4J NumberFormat and
    + * implements java.text.NumberFormat APIs.
    + */
    +public class NumberFormatICU extends java.text.NumberFormat {
    +
    +    private static final long serialVersionUID = 4892903815641574060L;
    +
    +    private NumberFormat fIcuNfmt;
    +
    +    private NumberFormatICU(NumberFormat icuNfmt) {
    +        fIcuNfmt = icuNfmt;
    +    }
    +
    +    public static java.text.NumberFormat wrap(NumberFormat icuNfmt) {
    +        if (icuNfmt instanceof NumberFormatJDK) {
    +            return ((NumberFormatJDK)icuNfmt).unwrap();
    +        }
    +        return new NumberFormatICU(icuNfmt);
    +    }
    +
    +    public NumberFormat unwrap() {
    +        return fIcuNfmt;
    +    }
    +
    +    @Override
    +    public Object clone() {
    +        NumberFormatICU other = (NumberFormatICU)super.clone();
    +        other.fIcuNfmt = (NumberFormat)fIcuNfmt.clone();
    +        return other;
    +    }
    +
    +    @Override
    +    public boolean equals(Object obj) {
    +        if (obj instanceof NumberFormatICU) {
    +            return ((NumberFormatICU)obj).fIcuNfmt.equals(fIcuNfmt);
    +        }
    +        return false;
    +    }
    +
    +    //public String format(double number)
    --- End diff --
    
    delete this unusable lien, keep clean!


---

Reply via email to