Code examples for ParsePosition

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
80:	m_pos.setErrorIndex(0); 
81:	m_pos.setIndex(0); 
-
87:	m_pos.setIndex(text.length()); 
-
92:	java.util.Date d1 = m_dfmt.parse(text, m_pos); 
-
100:	if ( d == null || m_pos.getIndex() < text.length() ) { 
Full Snippet Info
8
CodeRank
55:	ParsePosition position = new ParsePosition(0); 
56:	Number number = format.parse(text, position); 
57:	if (position.getErrorIndex() != -1) { 
58:	throw new ParseException(text, position.getIndex()); 
-
61:	if (text.length() != position.getIndex()) { 
-
63:	throw new ParseException(text, position.getIndex()); 
Full Snippet Info
8
CodeRank
80:	m_pos.setErrorIndex(0); 
81:	m_pos.setIndex(0); 
-
87:	m_pos.setIndex(text.length()); 
-
92:	java.util.Date d1 = m_dfmt.parse(text, m_pos); 
-
100:	if ( d == null || m_pos.getIndex() < text.length() ) { 
Full Snippet Info
7
CodeRank
48:	ParsePosition position = new ParsePosition(0); 
49:	Object result = format.parseObject(argument, position); 
50:	if (position.getErrorIndex() != -1) { 
Full Snippet Info
7
CodeRank
159:	int indexBefore = position.getIndex(); 
160:	Object result = nf.parseObject(sourseStr, position); 
-
163:	assertEquals(outIndex, position.getIndex()); 
-
166:	assertEquals(indexBefore, position.getIndex()); 
167:	assertEquals(outIndex, position.getErrorIndex()); 
Full Snippet Info
7
CodeRank
102:	ParsePosition pp = new ParsePosition(0); 
-
105:	fail(pp.toString()); 
Full Snippet Info
7
CodeRank
72:	o = format.parse(b.get("$date").toString(), new ParsePosition(0)); 
Full Snippet Info
7
CodeRank
151:	int index = p.getIndex(); 
-
156:	p.setIndex(string.length() + 1); 
Full Snippet Info
7
CodeRank
56:	ParsePosition position = new ParsePosition(start); 
-
62:	position.getIndex() == end); 
Full Snippet Info
7
CodeRank
44:	ParsePosition pp = new ParsePosition(0); 
45:	Number result = nf.parse(str, pp); 
-
47:	if (pp.getIndex() < str.length()) { 
Full Snippet Info
7
CodeRank
223:	final int initialIndex = pos.getIndex(); 
-
229:	final Number num = getNumeratorFormat().parse(source, pos); 
-
234:	pos.setIndex(initialIndex); 
-
239:	final int startIndex = pos.getIndex(); 
240:	final char c = parseNextCharacter(source, pos); 
-
253:	pos.setIndex(initialIndex); 
254:	pos.setErrorIndex(startIndex); 
-
262:	final Number den = getDenominatorFormat().parse(source, pos); 
-
267:	pos.setIndex(initialIndex); 
Full Snippet Info
6
CodeRank
102:	ParsePosition pos = new ParsePosition(0); 
-
104:	Number pageFormatWidth = parser.parse(pageSettings, pos); 
105:	if(pos.getErrorIndex() != -1 || pageFormatWidth == null) 
-
107:	pos.setIndex(pos.getIndex()+1); 
108:	Number pageFormatHeight = parser.parse(pageSettings, pos); 
109:	if(pos.getErrorIndex() != -1 || pageFormatHeight == null) 
-
111:	pos.setIndex(pos.getIndex()+1); 
112:	Number pageFormatImageableX = parser.parse(pageSettings, pos); 
113:	if(pos.getErrorIndex() != -1 || pageFormatImageableX == null) 
-
115:	pos.setIndex(pos.getIndex()+1); 
116:	Number pageFormatImageableY = parser.parse(pageSettings, pos); 
117:	if(pos.getErrorIndex() != -1|| pageFormatImageableY == null) 
-
119:	pos.setIndex(pos.getIndex()+1); 
120:	Number pageFormatImageableWidth = parser.parse(pageSettings, pos); 
121:	if(pos.getErrorIndex() != -1 || pageFormatImageableWidth == null) 
-
123:	pos.setIndex(pos.getIndex()+1); 
124:	Number pageFormatImageableHeight = parser.parse(pageSettings, pos); 
125:	if(pos.getErrorIndex() != -1 || pageFormatImageableHeight == null) 
-
127:	pos.setIndex(pos.getIndex()+1); 
128:	Number pageFormatOrientation = parser.parse(pageSettings, pos); 
129:	if(pos.getErrorIndex() != -1 || pageFormatOrientation == null) 
Full Snippet Info
6
CodeRank
80:	m_pos.setErrorIndex(0); 
81:	m_pos.setIndex(0); 
-
87:	m_pos.setIndex(text.length()); 
-
92:	java.util.Date d1 = m_dfmt.parse(text, m_pos); 
-
100:	if ( d == null || m_pos.getIndex() < text.length() ) { 
Full Snippet Info
7
CodeRank
118:	return dateFormatDateTime.parse(dateString, new ParsePosition(0)); 
Full Snippet Info
6
CodeRank
77:	Number val = childFormat.parse(source, pos); 
-
84:	if (pos.getIndex() != source.length()) { 
85:	pos.setErrorIndex(pos.getIndex()); 
86:	pos.setIndex(0); 
Full Snippet Info
7
CodeRank
54:	final ParsePosition position = new ParsePosition(0); 
-
56:	final C result = (C)format.parseObject(stringValue, position); 
-
58:	if (position.getIndex() != stringValue.length()) 
Full Snippet Info
7
CodeRank
10:	ParsePosition pos = new ParsePosition(0); 
11:	formatter.parse(str, pos); 
12:	return str.length() == pos.getIndex(); 
Full Snippet Info
6
CodeRank
27:	ParsePosition pp1 = new ParsePosition(0); 
-
30:	pp1.hashCode() == pp2.hashCode()); 
31:	pp1.setIndex(Integer.MAX_VALUE); 
-
33:	pp1.hashCode() != pp2.hashCode()); 
Full Snippet Info
6
CodeRank
31:	pos.setIndex(source.length()); 
Full Snippet Info
6
CodeRank
159:	int indexBefore = position.getIndex(); 
160:	Object result = nf.parseObject(sourseStr, position); 
-
163:	assertEquals(outIndex, position.getIndex()); 
-
166:	assertEquals(indexBefore, position.getIndex()); 
167:	assertEquals(outIndex, position.getErrorIndex()); 
Full Snippet Info
6
CodeRank