Class FunctorUtils


  • class FunctorUtils
    extends java.lang.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 java.lang.String UNSAFE_SERIALIZABLE_PROPERTY
      System property key to enable unsafe serialization
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FunctorUtils()
      Restricted constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void checkUnsafeSerialization​(java.lang.Class clazz)
      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​(java.util.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 Detail

      • UNSAFE_SERIALIZABLE_PROPERTY

        static final java.lang.String UNSAFE_SERIALIZABLE_PROPERTY
        System property key to enable unsafe serialization
        See Also:
        Constant Field Values
    • Constructor Detail

      • FunctorUtils

        private FunctorUtils()
        Restricted constructor.
    • Method Detail

      • 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​(java.util.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​(java.lang.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:
        java.lang.UnsupportedOperationException - if unsafe serialization is disabled