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

com.mpobjects.bdparsii.tokenizer.Position Maven / Gradle / Ivy

Go to download

bdparsii is a super fast and lightweight parser and expression evaluator. It is the BigDecimal brother of parsii.

There is a newer version: 1.0.0
Show newest version
/*
 * Made with all the love in the world
 * by scireum in Remshalden, Germany
 *
 * Copyright by scireum GmbH
 * http://www.scireum.de - [email protected]
 */

package com.mpobjects.bdparsii.tokenizer;

/**
 * Describes a position in a file or a stream based on lines and the character position within the line.
 */
@SuppressWarnings("squid:S1214")
public interface Position {

    /**
     * Represents an unknown position for warnings and errors which cannot be associated with a defined position.
     */
    Position UNKNOWN = new Position() {

        @Override
        public int getLine() {
            return 0;
        }

        @Override
        public int getPos() {
            return 0;
        }
    };

    /**
     * Returns the line number of this position.
     *
     * @return the one-based line number of this position
     */
    int getLine();

    /**
     * Returns the character position within the line of this position
     *
     * @return the one-based character position of this
     */
    int getPos();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy