1 /* GENERATED SOURCE. DO NOT MODIFY. */ 2 // © 2018 and later: Unicode, Inc. and others. 3 // License & terms of use: http://www.unicode.org/copyright.html#License 4 package ohos.global.icu.impl.number.range; 5 6 import java.util.Objects; 7 8 import ohos.global.icu.number.NumberRangeFormatter.RangeCollapse; 9 import ohos.global.icu.number.NumberRangeFormatter.RangeIdentityFallback; 10 import ohos.global.icu.number.UnlocalizedNumberFormatter; 11 import ohos.global.icu.util.ULocale; 12 13 /** 14 * @author sffc 15 * @hide exposed on OHOS 16 * 17 */ 18 public class RangeMacroProps { 19 public UnlocalizedNumberFormatter formatter1; 20 public UnlocalizedNumberFormatter formatter2; 21 public int sameFormatters = -1; // -1 for unset, 0 for false, 1 for true 22 public RangeCollapse collapse; 23 public RangeIdentityFallback identityFallback; 24 public ULocale loc; 25 26 @Override hashCode()27 public int hashCode() { 28 return Objects.hash(formatter1, 29 formatter2, 30 collapse, 31 identityFallback, 32 loc); 33 } 34 35 @Override equals(Object _other)36 public boolean equals(Object _other) { 37 if (_other == null) 38 return false; 39 if (this == _other) 40 return true; 41 if (!(_other instanceof RangeMacroProps)) 42 return false; 43 RangeMacroProps other = (RangeMacroProps) _other; 44 return Objects.equals(formatter1, other.formatter1) 45 && Objects.equals(formatter2, other.formatter2) 46 && Objects.equals(collapse, other.collapse) 47 && Objects.equals(identityFallback, other.identityFallback) 48 && Objects.equals(loc, other.loc); 49 } 50 } 51