com.ail.coretest
Class TestTypeXpath.TestFunctions

java.lang.Object
  extended by com.ail.coretest.TestTypeXpath.TestFunctions
Enclosing class:
TestTypeXpath

public static class TestTypeXpath.TestFunctions
extends java.lang.Object

Define a few simple functions for use from JXPath expressions


Constructor Summary
TestTypeXpath.TestFunctions()
           
 
Method Summary
static java.lang.Integer age(Attribute attrib)
           
static java.lang.Integer yearsSince(java.util.Date date, java.util.Date when)
           
static Attribute youngest(java.util.Collection attribs)
          Returns the youngest of a collection of date attributes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTypeXpath.TestFunctions

public TestTypeXpath.TestFunctions()
Method Detail

yearsSince

public static java.lang.Integer yearsSince(java.util.Date date,
                                           java.util.Date when)

age

public static java.lang.Integer age(Attribute attrib)

youngest

public static Attribute youngest(java.util.Collection attribs)
Returns the youngest of a collection of date attributes. The collection is assumed to be made up attributes (and only attributes) and only attributes of type date will be taken into account - any other attributes will be ignored.

Parameters:
attribs - Collection of date attributes
Returns:
The youngest date in the collection.