All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.icu.impl.number.range.RangeMacroProps Maven / Gradle / Ivy

Go to download

International Component for Unicode for Java (ICU4J) is a mature, widely used Java library providing Unicode and Globalization support

There is a newer version: 76.1
Show newest version
// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html#License
package com.ibm.icu.impl.number.range;

import java.util.Objects;

import com.ibm.icu.number.NumberRangeFormatter.RangeCollapse;
import com.ibm.icu.number.NumberRangeFormatter.RangeIdentityFallback;
import com.ibm.icu.number.UnlocalizedNumberFormatter;
import com.ibm.icu.util.ULocale;

/**
 * @author sffc
 *
 */
public class RangeMacroProps {
    public UnlocalizedNumberFormatter formatter1;
    public UnlocalizedNumberFormatter formatter2;
    public int sameFormatters = -1; // -1 for unset, 0 for false, 1 for true
    public RangeCollapse collapse;
    public RangeIdentityFallback identityFallback;
    public ULocale loc;

    @Override
    public int hashCode() {
        return Objects.hash(formatter1,
                formatter2,
                collapse,
                identityFallback,
                loc);
    }

    @Override
    public boolean equals(Object _other) {
        if (_other == null)
            return false;
        if (this == _other)
            return true;
        if (!(_other instanceof RangeMacroProps))
            return false;
        RangeMacroProps other = (RangeMacroProps) _other;
        return Objects.equals(formatter1, other.formatter1)
                && Objects.equals(formatter2, other.formatter2)
                && Objects.equals(collapse, other.collapse)
                && Objects.equals(identityFallback, other.identityFallback)
                && Objects.equals(loc, other.loc);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy