Class TLcdMorphedEnumeration

java.lang.Object
com.luciad.util.enumeration.TLcdMorphedEnumeration
All Implemented Interfaces:
ILcdAutoCloseableEnumeration, AutoCloseable, Enumeration

public class TLcdMorphedEnumeration extends Object implements ILcdAutoCloseableEnumeration
This class generates a modified Enumeration from a given Enumeration, by applying a given transformation to each of the elements before returning it.

Example applications:

  • The transformation can return a property or field of each element,
  • It can decode the element to a proper format and return that,
  • It can return the element itself, and just execute a side effect.
  • Constructor Details

    • TLcdMorphedEnumeration

      public TLcdMorphedEnumeration(Enumeration aEnumeration, ILcdMorphingFunction aMorphingFunction)
      Constructs a new Enumeration from the given Enumeration with a given transformation. For each originally enumerated element, the result of the transformation is returned instead of the element itself.
      Parameters:
      aEnumeration - the basic Enumeration that will be returned.
      aMorphingFunction - the function that is applied to each of the elements.
  • Method Details