public static DateValue getInstance ( Date date ) { DateValue result ; if ( date != null ) { synchronized ( cache ) { result = cache . get ( date ) ; if ( result == null ) { result = new DateValue ( date ) ; cache . put ( date , result ) ; } } } else { result = getInstance ( new Date ( ) ) ; } return result ; }
Constructs a new date value from a Java date object . Uses a cache to reuse date value objects .