/* * Copyright (C) 2021 eichehome * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package utils; /** * Diese Klasse stellt eine Element aus der FIFO-Pipe dar. * * @author eichehome */ public class PipeElement { private PipeElement next; private Message data; /** * Der Constructor, welcher ein neues Element erstellt * * @param el Der Inhalt, welcher in diesem Element gespeichert ist. */ public PipeElement(Message el) { data = el; next = null; } /** * Diese Funktion gubt einen Zeiger auf das nächste Objekt zurück * * @return Einen Zeiger auf das nächste Objekt */ public PipeElement getNext() { return next; } /** * Diese Funktion reiht ein Element nach diesem ein. * * @param element Das einzureihende Element */ public void setNextElement(PipeElement element) { next = element; } /** * Eine Funktion, die den Inhalt diese Elements zurück gibt * * @return Inhalt diese Elements */ public Message getData() { return data; } }