util
Class NoOpLambda

java.lang.Object
  extended by util.NoOpLambda
All Implemented Interfaces:
ILambda

public class NoOpLambda
extends java.lang.Object
implements ILambda

Represents the identity map. Null-object pattern for ILambda.

Author:
Dung X. Nguyen

Field Summary
static NoOpLambda Singleton
          This is the class field that gives access to the one instance of this class
 
Constructor Summary
private NoOpLambda()
          A private constructor keeps everyone except this class from constructing an instance.
 
Method Summary
 java.lang.Object apply(java.lang.Object arg)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Singleton

public static final NoOpLambda Singleton
This is the class field that gives access to the one instance of this class

Constructor Detail

NoOpLambda

private NoOpLambda()
A private constructor keeps everyone except this class from constructing an instance.

Method Detail

apply

public java.lang.Object apply(java.lang.Object arg)
Does nothing.

Specified by:
apply in interface ILambda
Parameters:
arg - input object for this ILambda object.
Returns:
arg as is.