LimeWire Collection Component API

org.limewire.collection
Enum FixedSizeLIFOSet.EjectionPolicy

java.lang.Object
  extended by java.lang.Enum<FixedSizeLIFOSet.EjectionPolicy>
      extended by org.limewire.collection.FixedSizeLIFOSet.EjectionPolicy
All Implemented Interfaces:
Serializable, Comparable<FixedSizeLIFOSet.EjectionPolicy>
Enclosing class:
FixedSizeLIFOSet<E>

public static enum FixedSizeLIFOSet.EjectionPolicy
extends Enum<FixedSizeLIFOSet.EjectionPolicy>

The EjectionPolicy controls which element should be removed from the Set if has reached its maximum capacity.


Enum Constant Summary
FIFO
          Removes the first-in (eldest) element from the Set if has reached its maximum capacity.
LIFO
          Removes the last-in (newest) element from the Set if it has reached its maximum capacity.
 
Method Summary
static FixedSizeLIFOSet.EjectionPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FixedSizeLIFOSet.EjectionPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LIFO

public static final FixedSizeLIFOSet.EjectionPolicy LIFO
Removes the last-in (newest) element from the Set if it has reached its maximum capacity.


FIFO

public static final FixedSizeLIFOSet.EjectionPolicy FIFO
Removes the first-in (eldest) element from the Set if has reached its maximum capacity.

Method Detail

values

public static FixedSizeLIFOSet.EjectionPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FixedSizeLIFOSet.EjectionPolicy c : FixedSizeLIFOSet.EjectionPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FixedSizeLIFOSet.EjectionPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

LimeWire Collection Component API

Copyright © 2008 Lime Wire LLC. All Rights Reserved.