1/* 2 ******************************************************************************* 3 * Copyright (C) 2010, International Business Machines Corporation and * 4 * others. All Rights Reserved. * 5 ******************************************************************************* 6 */ 7package com.ibm.icu.impl.locale; 8 9public class ParseStatus { 10 int _parseLength = 0; 11 int _errorIndex = -1; 12 String _errorMsg = null; 13 14 public void reset() { 15 _parseLength = 0; 16 _errorIndex = -1; 17 _errorMsg = null; 18 } 19 20 public boolean isError() { 21 return (_errorIndex >= 0); 22 } 23 24 public int getErrorIndex() { 25 return _errorIndex; 26 } 27 28 public int getParseLength() { 29 return _parseLength; 30 } 31 32 public String getErrorMessage() { 33 return _errorMsg; 34 } 35} 36