Create action log panel in HUD

This commit is contained in:
2022-08-18 09:44:16 +02:00
parent ad30a8dcf5
commit a2d95855c5
10 changed files with 131 additions and 15 deletions

View File

@@ -0,0 +1,20 @@
package com.bartlomiejpluta.demo.util;
import lombok.*;
import java.util.LinkedList;
@AllArgsConstructor
public class LimitedQueue<E> extends LinkedList<E> {
private int limit;
@Override
public boolean add(E o) {
super.add(o);
while (size() > limit) {
super.remove();
}
return true;
}
}