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

org.github.evenjn.align.TupleAlignmentGraphDataManagerBlueprint Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
/**
 *
 * Copyright 2016 Marco Trevisan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package org.github.evenjn.align;

import java.util.function.Consumer;
import java.util.function.Function;

import org.github.evenjn.yarn.Cursable;
import org.github.evenjn.yarn.Hook;

public class TupleAlignmentGraphDataManagerBlueprint {

	private int min_below = 1;

	private int max_below = 1;

	private Function a_serializer;

	private Function b_serializer;

	private Function a_deserializer;

	private Function b_deserializer;

	private Function> putter_coalignment_alphabet;

	private Cursable reader_coalignment_alphabet;

	private Function> putter_coalignment_graphs;

	private Cursable reader_coalignment_graphs;

	private boolean refresh_cache = true;

	public TupleAlignmentGraphDataManagerBlueprint setMinBelow( int min ) {
		this.min_below = min;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint setMaxBelow( int max ) {
		this.max_below = max;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint setInputCoDec(
			Function a_serializer,
			Function a_deserializer ) {
		this.a_serializer = a_serializer;
		this.a_deserializer = a_deserializer;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint setOutputCoDec(
			Function b_serializer,
			Function b_deserializer ) {
		this.b_serializer = b_serializer;
		this.b_deserializer = b_deserializer;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint
			deserializeTupleAlignmentAlphabet(
					Cursable reader_alphabet ) {
		this.reader_coalignment_alphabet = reader_alphabet;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint
			serializeTupleAlignmentAlphabet(
					Function> putter_alphabet ) {
		this.putter_coalignment_alphabet = putter_alphabet;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint
			deserializeTupleAlignmentGraphs(
					Cursable reader_coalignments ) {
		this.reader_coalignment_graphs = reader_coalignments;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint
			serializeTupleAlignmentGraphs(
					Function> putter_coalignments ) {
		this.putter_coalignment_graphs = putter_coalignments;
		return this;
	}

	public TupleAlignmentGraphDataManagerBlueprint refreshCache(
			boolean refresh_cache ) {
		this.refresh_cache = refresh_cache;
		return this;
	}

	public TupleAlignmentGraphDataManager create( ) {

		return new TupleAlignmentGraphDataManager<>(
				min_below,
				max_below,
				putter_coalignment_alphabet,
				reader_coalignment_alphabet,
				putter_coalignment_graphs,
				reader_coalignment_graphs,
				a_serializer,
				b_serializer,
				a_deserializer,
				b_deserializer,
				refresh_cache );
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy