org.eclipse.xtext.xbase.lib
Class ObjectExtensions

java.lang.Object
  extended by org.eclipse.xtext.xbase.lib.ObjectExtensions

public class ObjectExtensions
extends java.lang.Object

This is an extension library for all objects.


Constructor Summary
ObjectExtensions()
           
 
Method Summary
static boolean operator_equals(java.lang.Object a, java.lang.Object b)
          The equals operator.
static
<A,B> Pair<A,B>
operator_mappedTo(A a, B b)
          The mappedTo operator yields a Pair with a as the key and b as its value.
static boolean operator_notEquals(java.lang.Object a, java.lang.Object b)
          The equals not operator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectExtensions

public ObjectExtensions()
Method Detail

operator_notEquals

public static boolean operator_notEquals(java.lang.Object a,
                                         java.lang.Object b)
The equals not operator. This is the equivalent to a negated, null-safe Object.equals(Object) method.

Parameters:
a - an object.
b - another object.
Returns:
true if a and b are not equal.

operator_equals

public static boolean operator_equals(java.lang.Object a,
                                      java.lang.Object b)
The equals operator. This is the equivalent to a null-safe invocation of Object.equals(Object).

Parameters:
a - an object.
b - another object.
Returns:
true if a and b are equal.

operator_mappedTo

public static <A,B> Pair<A,B> operator_mappedTo(A a,
                                                B b)
The mappedTo operator yields a Pair with a as the key and b as its value.

Parameters:
a - an object.
b - another object.
Returns:
a Pair. Never null.