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

com.univocity.parsers.common.ParsingContextWrapper Maven / Gradle / Ivy

Go to download

univocity's open source parsers for processing different text formats using a consistent API

There is a newer version: 2.9.1
Show newest version
/*
 * Copyright (c) 2015 uniVocity Software Pty Ltd. All rights reserved.
 * This file is subject to the terms and conditions defined in file
 * 'LICENSE.txt', which is part of this source code package.
 *
 */
package com.univocity.parsers.common;

import com.univocity.parsers.common.record.*;

import java.util.*;

/**
 * A simple a wrapper for a {@link ParsingContext}.
 *
 * @author uniVocity Software Pty Ltd - [email protected]
 *
 */
public class ParsingContextWrapper extends ContextWrapper implements ParsingContext {

	/**
	 * Wraps a {@link ParsingContext}.
	 * @param context the parsingContext object to be wrapped.
	 */
	public ParsingContextWrapper(ParsingContext context) {
		super(context);
	}

	@Override
	public long currentLine() {
		return context.currentLine();
	}

	@Override
	public long currentChar() {
		return context.currentChar();
	}

	@Override
	public void skipLines(long lines) {
		context.skipLines(lines);
	}

	@Override
	public String currentParsedContent() {
		return context.currentParsedContent();
	}

	@Override
	public Map comments() {
		return context.comments();
	}

	@Override
	public String lastComment() {
		return context.lastComment();
	}

	@Override
	public String[] parsedHeaders() {
		return context.parsedHeaders();
	}

	@Override
	public char[] lineSeparator() {
		return context.lineSeparator();
	}

	@Override
	public String fieldContentOnError() {
		return context.fieldContentOnError();
	}

	@Override
	public String[] selectedHeaders() {
		return context.selectedHeaders();
	}

	@Override
	public Record toRecord(String[] row) {
		return context.toRecord(row);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy