1 /* GENERATED SOURCE. DO NOT MODIFY. */
2 // © 2016 and later: Unicode, Inc. and others.
3 // License & terms of use: http://www.unicode.org/copyright.html#License
4 /*
5 **********************************************************************
6 * Copyright (c) 2013-2014, International Business Machines
7 * Corporation and others.  All Rights Reserved.
8 **********************************************************************
9 */
10 package android.icu.impl;
11 
12 import java.text.FieldPosition;
13 
14 /**
15  * DontCareFieldPosition is a subclass of FieldPosition that indicates that the
16  * caller is not interested in the start and end position of any field.
17  * <p>
18  * DontCareFieldPosition is a singleton, and its instance is immutable.
19  * <p>
20  * A <code>format</code> method use <code>fpos == DontCareFieldPosition.INSTANCE</code>
21  * to tell whether or not it needs to calculate a field position.
22  * @hide Only a subset of ICU is exposed in Android
23  *
24  */
25 public final class DontCareFieldPosition extends FieldPosition {
26 
27     public static final DontCareFieldPosition INSTANCE = new DontCareFieldPosition();
28 
DontCareFieldPosition()29     private DontCareFieldPosition() {
30         // Pick some random number to be sure that we don't accidentally match with
31         // a field.
32         super(-913028704);
33     }
34 
35     @Override
setBeginIndex(int i)36     public void setBeginIndex(int i) {
37         // Do nothing
38     }
39 
40     @Override
setEndIndex(int i)41     public void setEndIndex(int i) {
42         // Do nothing
43     }
44 
45 }
46