Class FunctorUtils

java.lang.Object
org.apache.commons.collections.functors.FunctorUtils

class FunctorUtils extends Object
Internal utilities for functors.
Since:
Commons Collections 3.0
Version:
$Revision: 1713845 $ $Date: 2015-11-11 15:02:16 +0100 (Wed, 11 Nov 2015) $
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final String
    System property key to enable unsafe serialization
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Restricted constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static void
    Package-private helper method to check if serialization support is enabled for unsafe classes.
    (package private) static Closure[]
    copy(Closure[] closures)
    Clone the closures to ensure that the internal reference can't be messed with.
    (package private) static Predicate[]
    copy(Predicate[] predicates)
    Clone the predicates to ensure that the internal reference can't be messed with.
    (package private) static Transformer[]
    copy(Transformer[] transformers)
    Copy method
    (package private) static Predicate[]
    validate(Collection predicates)
    Validate the predicates to ensure that all is well.
    (package private) static void
    validate(Closure[] closures)
    Validate the closures to ensure that all is well.
    (package private) static void
    validate(Predicate[] predicates)
    Validate the predicates to ensure that all is well.
    (package private) static void
    validate(Transformer[] transformers)
    Validate method

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNSAFE_SERIALIZABLE_PROPERTY

      static final String UNSAFE_SERIALIZABLE_PROPERTY
      System property key to enable unsafe serialization
      See Also:
  • Constructor Details

    • FunctorUtils

      private FunctorUtils()
      Restricted constructor.
  • Method Details

    • copy

      static Predicate[] copy(Predicate[] predicates)
      Clone the predicates to ensure that the internal reference can't be messed with.
      Parameters:
      predicates - the predicates to copy
      Returns:
      the cloned predicates
    • validate

      static void validate(Predicate[] predicates)
      Validate the predicates to ensure that all is well.
      Parameters:
      predicates - the predicates to validate
    • validate

      static Predicate[] validate(Collection predicates)
      Validate the predicates to ensure that all is well.
      Parameters:
      predicates - the predicates to validate
      Returns:
      predicate array
    • copy

      static Closure[] copy(Closure[] closures)
      Clone the closures to ensure that the internal reference can't be messed with.
      Parameters:
      closures - the closures to copy
      Returns:
      the cloned closures
    • validate

      static void validate(Closure[] closures)
      Validate the closures to ensure that all is well.
      Parameters:
      closures - the closures to validate
    • copy

      static Transformer[] copy(Transformer[] transformers)
      Copy method
      Parameters:
      transformers - the transformers to copy
      Returns:
      a clone of the transformers
    • validate

      static void validate(Transformer[] transformers)
      Validate method
      Parameters:
      transformers - the transformers to validate
    • checkUnsafeSerialization

      static void checkUnsafeSerialization(Class clazz)
      Package-private helper method to check if serialization support is enabled for unsafe classes.
      Parameters:
      clazz - the clazz to check for serialization support
      Throws:
      UnsupportedOperationException - if unsafe serialization is disabled