mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Ludovic Poitou
24.47.2010 ebf96a30d0122d35e271bad15f1f31a0a9100842
sdk/src/com/sun/opends/sdk/util/Functions.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 */
package com.sun.opends.sdk.util;
@@ -174,6 +174,17 @@
    }
  };
  private static final Function<Object, Object, Void> IDENTITY =
    new Function<Object, Object, Void>()
  {
    public Object apply(Object value, Void p)
    {
      return value;
    }
  };
  /**
@@ -204,6 +215,23 @@
  /**
   * Returns a function which always returns the value that it was provided
   * with.
   *
   * @param <M>
   *          The type of values transformed by this function.
   * @return A function which always returns the value that it was provided
   *         with.
   */
  @SuppressWarnings("unchecked")
  public static <M> Function<M, M, Void> identityFunction()
  {
    return (Function<M, M, Void>) IDENTITY;
  }
  /**
   * Returns a function which converts a {@code String} to lower case using
   * {@link StaticUtils#toLowerCase} and then trims it.
   *