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

lphystudio.core.logger.AlignmentTextFormatter Maven / Gradle / Ivy

The newest version!
package lphystudio.core.logger;

import lphy.base.evolution.alignment.SimpleAlignment;
import lphy.core.logger.ValueFormatter;
import lphy.core.model.Symbols;

public class AlignmentTextFormatter implements ValueFormatter {

    SimpleAlignment simpleAlignment;
    String valueID;
//    boolean isClamped;

//    public AlignmentTextFormatter(String valueID, SimpleAlignment simpleAlignment, Boolean isClamped) {
//        this.valueID = Symbols.getCanonical(valueID);
//        this.simpleAlignment = simpleAlignment;
//        this.isClamped = isClamped;
//    }

    public AlignmentTextFormatter(String valueID, SimpleAlignment simpleAlignment) {
        this.valueID = Symbols.getCanonical(valueID);
        this.simpleAlignment = simpleAlignment;
    }

    @Override
    public String getExtension() {
        return ".txt";
    }

    @Override
    public Mode getMode() {
        return Mode.VALUE_PER_FILE;
    }

    @Override
    public Class getDataTypeClass() {
        return SimpleAlignment.class;
    }

    @Override
    public String getValueID() {
        return valueID;
    }

    @Override
    public String format(SimpleAlignment simpleAlignment) {
        return simpleAlignment.toString();
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy