org.eclipse.xtext.xbase.lib
Class ComparableExtensions

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

public class ComparableExtensions
extends Object

This is an extension library for comparables.

Author:
Sven Efftinge - Initial contribution and API

Constructor Summary
ComparableExtensions()
           
 
Method Summary
static
<C> boolean
operator_greaterEqualsThan(Comparable<? super C> left, C right)
          The comparison operator greater than or equals.
static
<C> boolean
operator_greaterThan(Comparable<? super C> left, C right)
          The comparison operator greater than.
static
<C> boolean
operator_lessEqualsThan(Comparable<? super C> left, C right)
          The comparison operator less than or equals.
static
<C> boolean
operator_lessThan(Comparable<? super C> left, C right)
          The comparison operator less than.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparableExtensions

public ComparableExtensions()
Method Detail

operator_lessThan

public static <C> boolean operator_lessThan(Comparable<? super C> left,
                                            C right)
The comparison operator less than.

Parameters:
left - a comparable
right - the value to compare with
Returns:
left.compareTo(right) < 0

operator_greaterThan

public static <C> boolean operator_greaterThan(Comparable<? super C> left,
                                               C right)
The comparison operator greater than.

Parameters:
left - a comparable
right - the value to compare with
Returns:
left.compareTo(right) > 0

operator_lessEqualsThan

public static <C> boolean operator_lessEqualsThan(Comparable<? super C> left,
                                                  C right)
The comparison operator less than or equals.

Parameters:
left - a comparable
right - the value to compare with
Returns:
left.compareTo(right) <= 0

operator_greaterEqualsThan

public static <C> boolean operator_greaterEqualsThan(Comparable<? super C> left,
                                                     C right)
The comparison operator greater than or equals.

Parameters:
left - a comparable
right - the value to compare with
Returns:
left.compareTo(right) >= 0


Copyright © 2012. All Rights Reserved.