de.bsvrz.vew.bmvew.bmvew.meldung
Class InformationsAnteilListe

java.lang.Object
  extended by de.bsvrz.vew.bmvew.bmvew.meldung.InformationsAnteilListe

public class InformationsAnteilListe
extends java.lang.Object

Die Klasse arbeitet als Stack mit begrenztem Fassungsvermögen. Wenn die maximale Anzahl erreicht ist, wird das älteste Element ueberschrieben.

Version:
$Revision: 1.3 $ / $Date: 2015/06/09 13:02:12 $ / ($Author: Pittner $)
Author:
Dambach-Werke GmbH, Timo Pittner

Field Summary
private  int MAX_SIZE
          Die Groesse der Infoanteil-Liste
private  InformationsAnteil[] stack
          Das Feld der Infoanteile
private  int tiefe
          Die Tiefe
 
Constructor Summary
InformationsAnteilListe()
          Konstruktor
InformationsAnteilListe(int size)
          Konstruktor
 
Method Summary
 InformationsAnteil[] getAll()
          Liest alle Elemente des Stack
 InformationsAnteil peek()
          Liest das oberste Element des Stacks
 InformationsAnteil pop()
          Holt ein Objekt vom Stack
 void push(InformationsAnteil n)
          Legt ein Objekt auf den Stack
 int size()
          Ermittelt die Anzahl der Elemente
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SIZE

private int MAX_SIZE
Die Groesse der Infoanteil-Liste


tiefe

private int tiefe
Die Tiefe


stack

private InformationsAnteil[] stack
Das Feld der Infoanteile

Constructor Detail

InformationsAnteilListe

public InformationsAnteilListe()
Konstruktor


InformationsAnteilListe

public InformationsAnteilListe(int size)
Konstruktor

Parameters:
size -
Method Detail

push

public void push(InformationsAnteil n)
Legt ein Objekt auf den Stack

Parameters:
n - Element

pop

public InformationsAnteil pop()
Holt ein Objekt vom Stack

Returns:
Element

peek

public InformationsAnteil peek()
Liest das oberste Element des Stacks

Returns:
Element

getAll

public InformationsAnteil[] getAll()
Liest alle Elemente des Stack

Returns:
Feld der Elemente

size

public int size()
Ermittelt die Anzahl der Elemente

Returns:
Anzahl