/* Copyright (c) 2000-2006 hamcrest.org */ package org.hamcrest.number; import org.hamcrest.Description; import org.hamcrest.TypeSafeMatcher; /** * Is the value less than or greater than another {@link java.lang.Comparable} value? */ public class IsGreaterThan> extends TypeSafeMatcher { private final Comparable compareTo; public IsGreaterThan(Comparable compareTo) { this.compareTo = compareTo; } public boolean matchesSafely(T item) { return compareTo.compareTo(item) < 0; } public void describeTo(Description description) { description.appendText("a value greater than "); description.appendValue(compareTo); } }