<p>I am looking in the Collections framework of Java for a LIFO Structure (Stack) without any success. Basically I want a really simple stack; my perfect option would be a Deque, but I am in Java 1.5.</p>

<p>I would like not to have to add another class to my structure but I am wondering if that is possible:</p>

<ol>
<li><p>Is there any class in the Collections framework (1.5) that does the job?</p></li>
<li><p>If not, is there any way to turn a Queue in a LIFO Queue (aka Stack) without reimplementation?</p></li>
<li><p>If not, which Interface or class should I extend for this task? I guess that keep the way that the guys of Sun have made with the Deque is a good start.</p></li>
</ol>

<p>Thanks a lot.</p>

<p>EDIT: I forgot to say about the Stack class: I have my doubts about this class when I saw that it implements the Vector class, and the Vector class is a little bit obsolete, isn't it?</p>

There is a
Stack class in the API
.  Will this meet your needs?