WIZARD_PR2_DOP/Domain/Block/Block.java

29 lines
750 B
Java
Raw Normal View History

/*
============================================================
This is the "Block" file from Author: Philipp Kotte
written on: 05 / 10 / 2023 at: 23:43
============================================================
*/
package Domain.Block;
import java.util.ArrayList;
public class Block {
private ArrayList<Blockzeile> zeilen;
public Block(){
this.zeilen = new ArrayList<>();
}
public void addZeile(Blockzeile blockzeile) {
zeilen.add(blockzeile);
2023-10-11 16:56:05 +02:00
}
public Blockzeile[] getDaten(){
if(zeilen.isEmpty()){
System.out.println("Die Liste der Blockzeilen ist Leer. ");
return zeilen.toArray(new Blockzeile[0]);
}
return zeilen.toArray(new Blockzeile[0]);
2023-10-11 16:56:05 +02:00
}
}