Code example for Scanner

Methods: hasNextnext

0
		mNetAdapter.sendText('H');
	} 
	 
	public boolean hasNext() { 
		// TODO: if 'C' is the next return false 
		return mPriceScanner.hasNext();
	} 
	 
	public PricePoint getNext() { 
		if(!this.hasNext()) return null;
		String line;
		if ((line = mPriceScanner.next()).compareTo("C") == 0)
			return null; 
		else 
			return new PricePoint(++mCurTime, Float.valueOf(line));
	} 
	 
	public void close() throws IOException { 
		mNetAdapter.close();
	}