Best code examples for Java 8 ParsePosition class (java.text.ParsePosition)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ParsePosition class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 ParsePosition examples from Open Source projects
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
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
This code example shows how to use the following methods: getErrorIndex, getIndex
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
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
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
This code example shows how to use the following methods: getErrorIndex
48:	ParsePosition position = new ParsePosition(0); 
49:	Object result = format.parseObject(argument, position); 
50:	if (position.getErrorIndex() != -1) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getErrorIndex, getIndex
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
This code example shows how to use the following methods: toString
102:	ParsePosition pp = new ParsePosition(0); 
-
105:	fail(pp.toString()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
72:	o = format.parse(b.get("$date").toString(), new ParsePosition(0)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getIndex, setIndex
151:	int index = p.getIndex(); 
-
156:	p.setIndex(string.length() + 1); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getIndex
56:	ParsePosition position = new ParsePosition(start); 
-
62:	position.getIndex() == end); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getIndex
44:	ParsePosition pp = new ParsePosition(0); 
45:	Number result = nf.parse(str, pp); 
-
47:	if (pp.getIndex() < str.length()) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
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
This code example shows how to use the following methods: getErrorIndex, getIndex, setIndex
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
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
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
This code example shows how to use the following methods:
118:	return dateFormatDateTime.parse(dateString, new ParsePosition(0)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
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
This code example shows how to use the following methods: getIndex
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
This code example shows how to use the following methods: getIndex
10:	ParsePosition pos = new ParsePosition(0); 
11:	formatter.parse(str, pos); 
12:	return str.length() == pos.getIndex(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hashCode, setIndex
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
This code example shows how to use the following methods: setIndex
31:	pos.setIndex(source.length()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getErrorIndex, getIndex
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
This code example shows how to use the following methods: getErrorIndex, getIndex
138:	pp = new ParsePosition(0); 
-
147:	if (parsed != null && pp.getIndex() == timestampStr.length()) { 
-
152:	pp.getErrorIndex()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getErrorIndex, getIndex
138:	ParsePosition pos = new ParsePosition( 0 ); 
139:	Date parsedDate = format.parse( value, pos ); // ignore the result (use the Calendar) 
-
141:	if ( pos.getErrorIndex() >= 0 || pos.getIndex() != value.length() || parsedDate == null ) 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
81:	if (pos.getIndex() != source.length()) { 
82:	pos.setErrorIndex(pos.getIndex()); 
83:	pos.setIndex(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
80:	Number val = childFormat.parse(source, pos); 
-
87:	if (pos.getIndex() != source.length()) { 
88:	pos.setErrorIndex(pos.getIndex()); 
89:	pos.setIndex(0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
370:	int initialIndex = pos.getIndex(); 
-
373:	CompositeFormat.parseAndIgnoreWhitespace(source, pos); 
-
376:	Number re = CompositeFormat.parseNumber(source, getRealFormat(), pos); 
-
380:	pos.setIndex(initialIndex); 
-
385:	int startIndex = pos.getIndex(); 
386:	char c = CompositeFormat.parseNextCharacter(source, pos); 
-
403:	pos.setIndex(initialIndex); 
404:	pos.setErrorIndex(startIndex); 
-
409:	CompositeFormat.parseAndIgnoreWhitespace(source, pos); 
-
412:	Number im = CompositeFormat.parseNumber(source, getRealFormat(), pos); 
-
416:	pos.setIndex(initialIndex); 
-
421:	if (!CompositeFormat.parseFixedstring(source, getImaginaryCharacter(), pos)) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setIndex
190:	ParsePosition pp = new ParsePosition(0); 
191:	pp.setIndex(0); 
-
193:	date = format.parse(s, pp); 
194:	if (pp.getIndex() != s.length() || date == null) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
214:	final int initialIndex = pos.getIndex(); 
-
220:	final Number num = getNumeratorFormat().parse(source, pos); 
-
225:	pos.setIndex(initialIndex); 
-
230:	final int startIndex = pos.getIndex(); 
231:	final char c = parseNextCharacter(source, pos); 
-
244:	pos.setIndex(initialIndex); 
245:	pos.setErrorIndex(startIndex); 
-
253:	final Number den = getDenominatorFormat().parse(source, pos); 
-
258:	pos.setIndex(initialIndex); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getErrorIndex
162:	ParsePosition pos = new ParsePosition(0); 
163:	Calendar cal = (Calendar) format.parseObject(arg0, pos); 
-
166:	" at:" + arg0.substring(pos.getErrorIndex())); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex
113:	ParsePosition pos = new ParsePosition(0); 
114:	Date p = dateFormat().parse(str, pos); 
115:	if (p != null && pos.getIndex() == str.length()) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setIndex
75:	pos.setIndex(str.length()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getErrorIndex, getIndex, hashCode
71:	assertTrue("Wrong hashCode returned", (pp.hashCode() == pp.getIndex() 
72:	+ pp.getErrorIndex())); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hashCode, setIndex
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
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
99:	parsePositionBuffer.setIndex(0); 
100:	parsePositionBuffer.setErrorIndex(-1); 
-
102:	if (parsePositionBuffer.getIndex() == 0) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
214:	final int initialIndex = pos.getIndex(); 
-
220:	final Number num = getNumeratorFormat().parse(source, pos); 
-
225:	pos.setIndex(initialIndex); 
-
230:	final int startIndex = pos.getIndex(); 
231:	final char c = parseNextCharacter(source, pos); 
-
244:	pos.setIndex(initialIndex); 
245:	pos.setErrorIndex(startIndex); 
-
253:	final Number den = getDenominatorFormat().parse(source, pos); 
-
258:	pos.setIndex(initialIndex); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setIndex
76:	pos.setIndex(str.length()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
461:	format.parse(null, new ParsePosition(0)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
50:	Date last = new SimpleDateFormat("MM/dd/yyyy HH:mm").parse(lastBuilt, new ParsePosition(0)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex
80:	ParsePosition parsePosition = new ParsePosition(0); 
81:	Number parsedValue = getFormat(locale).parse(value, parsePosition); 
82:	if (parsePosition.getIndex() != value.length()) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setIndex
76:	pos.setIndex(str.length()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
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
6
CodeRank
This code example shows how to use the following methods: getIndex
83:	ParsePosition parsePosition = new ParsePosition(0); 
84:	Date parsedValue = getFormat(locale).parse(value, parsePosition); 
85:	if (parsePosition.getIndex() != value.length()) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setIndex
76:	pos.setIndex(str.length()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getIndex, setErrorIndex, setIndex
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
6
CodeRank
This code example shows how to use the following methods: getIndex
89:	ParsePosition parsePosition = new ParsePosition(0); 
-
91:	Number number = format.parse(string, parsePosition); 
-
97:	if (string.length() != parsePosition.getIndex()) { 
Full Snippet Info
6
CodeRank
Related Java 8 ParsePosition Questions & Answers:
See Code Examples for Java 8 ParsePosition Methods: