BUT2/DEV/DEV3.2/DEV32/1/File.java
2023-12-21 16:36:03 +01:00

22 lines
350 B
Java

import java.util.*;
public class File<E>{
private Queue<E> file;
public File(){
this.file = new LinkedList<>();
}
public void enqueue(E valeur){
this.file.offer(valeur);
}
public E dequeue(){
return this.file.poll();
}
public boolean isEmpty(){
return this.file.isEmpty();
}
}