Code example for Timestamp

Methods: compareTo

0
	} 
 
	@Override 
	public Val less(Val val) {
		if(val instanceof TIMESTAMP)
			return new BOOLEAN(value.compareTo(((TIMESTAMP)val).value) < 0);
		else { 
			System.out.println("in TIMESTAMP, operation not allowed");
			return null; 
		} 
	} 
 
	@Override 
	public Val greater(Val val) {
		if(val instanceof TIMESTAMP)
			return new BOOLEAN(value.compareTo(((TIMESTAMP)val).value) > 0);
		else { 
			System.out.println("in TIMESTAMP, operation not allowed");
			return null; 
		} 
	}