Code example for TreeMap

Methods: floorEntryget

0
		} 
		return lines.get(line);
	} 
	 
	public int getColumn(int pos) {
		Entry<Integer, Integer> entry = lines.floorEntry(pos);
		if (entry == null) {
			return pos;
		} 
		return lines.get(entry.getKey()) - pos;
	} 
 
	public int getLineCount() { 
		return lines.size() + 1;
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java