All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.daisy.dotify.studio.api.DocumentPosition Maven / Gradle / Ivy

package org.daisy.dotify.studio.api;

import javax.xml.stream.Location;

public final class DocumentPosition implements Comparable {
	private final int line;
	private final int column;
	
	public DocumentPosition(int line, int column) {
		this.line = line;
		this.column = column;
	}
	
	public static DocumentPosition with(int line, int column) {
		return new DocumentPosition(line, column);
	}

	public static DocumentPosition with(Location l) {
		return DocumentPosition.with(l.getLineNumber(), l.getColumnNumber());
	}
	
	public boolean isBefore(DocumentPosition other) {
		return getLineNumber()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy