Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.util
Class ExpiringStack

    java.lang.Object
      org.apache.mina.util.ExpiringStack

All Implemented Interfaces:
  Serializable

    public class ExpiringStack

extends Object
implements Serializable

A unbounded stack with expiration.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)
See Also:
  Serialized Form

Constructor Summary
`ExpiringStack()` Construct a new, empty stack.

Method Summary
`void` | `clear()` Clears this stack.
`void` | `expireBefore(long time)`
`Object` | `first()` Returns the first element of the stack.
`boolean` | `isEmpty()` Returns `true` if the stack is empty.
`Object` | `last()`
`Object` | `pop()` Pops from this stack.
`void` | `push(Object obj)` Push into this stack.
`void` | `remove(Object o)`
`int` | `size()` Returns the number of elements in the stack.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExpiringStack

    public ExpiringStack()

  Construct a new, empty stack.

Method Detail

### clear

    public void clear()

  Clears this stack.

### pop

    public Object pop()

  Pops from this stack.

  Returns:
    `null`, if this stack is empty or the element is really `null`.

### push

    public void push(Object obj)

  Push into this stack.

### remove

    public void remove(Object o)

### expireBefore

    public void expireBefore(long time)

### first

    public Object first()

  Returns the first element of the stack.

  Returns:
    `null`, if the stack is empty, or the element is really `null`.

### last

    public Object last()

### isEmpty

    public boolean isEmpty()

  Returns `true` if the stack is empty.

### size

    public int size()

  Returns the number of elements in the stack.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.