equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
30 ******************************************************************************* |
30 ******************************************************************************* |
31 */ |
31 */ |
32 package sun.util.locale; |
32 package sun.util.locale; |
33 |
33 |
34 public class ParseStatus { |
34 public class ParseStatus { |
35 int _parseLength = 0; |
35 int parseLength; |
36 int _errorIndex = -1; |
36 int errorIndex; |
37 String _errorMsg = null; |
37 String errorMsg; |
|
38 |
|
39 public ParseStatus() { |
|
40 reset(); |
|
41 } |
38 |
42 |
39 public void reset() { |
43 public void reset() { |
40 _parseLength = 0; |
44 parseLength = 0; |
41 _errorIndex = -1; |
45 errorIndex = -1; |
42 _errorMsg = null; |
46 errorMsg = null; |
43 } |
47 } |
44 |
48 |
45 public boolean isError() { |
49 public boolean isError() { |
46 return (_errorIndex >= 0); |
50 return (errorIndex >= 0); |
47 } |
51 } |
48 |
52 |
49 public int getErrorIndex() { |
53 public int getErrorIndex() { |
50 return _errorIndex; |
54 return errorIndex; |
51 } |
55 } |
52 |
56 |
53 public int getParseLength() { |
57 public int getParseLength() { |
54 return _parseLength; |
58 return parseLength; |
55 } |
59 } |
56 |
60 |
57 public String getErrorMessage() { |
61 public String getErrorMessage() { |
58 return _errorMsg; |
62 return errorMsg; |
59 } |
63 } |
60 } |
64 } |