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

fr.noop.subtitle.util.SubtitleTextLine Maven / Gradle / Ivy

Go to download

Convert subtitles from one format to another format. Supported formats: STL EBU, TTML SMI, VTT, SRT, STT XML, ASS

There is a newer version: 1.2.7
Show newest version
/*
 *  This file is part of the noOp organization .
 *
 *  (c) Cyrille Lebeaupin 
 *
 *  For the full copyright and license information, please view the LICENSE
 *  file that was distributed with this source code.
 *
 */

package fr.noop.subtitle.util;

import fr.noop.subtitle.model.SubtitleLine;
import fr.noop.subtitle.model.SubtitleText;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by clebeaupin on 06/10/15.
 */
public class SubtitleTextLine implements SubtitleLine {
    List texts;

    public SubtitleTextLine() {
        this.texts = new ArrayList<>();
    }

    public SubtitleTextLine(List texts) {
        this.texts = texts;
    }

    public List getTexts() {
        return this.texts;
    }

    public void addText(SubtitleText text) {
        this.texts.add(text);
    }

    public boolean isEmpty() {
        return this.toString().isEmpty();
    }

    @Override
    public String toString() {
        String[] texts = new String[this.texts.size()];

        for (int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy