Usage model. To motivate the behavior of add() and roll(), consider a user interface component with increment and decrement buttons for the month, day, and year, and an underlying GregorianCalendar. If the interface reads January 31, 1999 and the user presses the month increment button, what should it read? If the underlying implementation uses set(), it might read March 3, 1999. A better result would be February 28, 1999. Furthermore, if the user presses the month increment button again, it should read March 31, 1999, not March 28, 1999. By saving the original date and using either add() or roll(), depending on whether larger fields should be affected, the user interface can behave as most users will intuitively expect.
Order<{1,1}>, Residual1
Order<{1,2}>, Residual2
Order<{2,2}>, Residual3
Order<{1,2}>, Residual1
Order<{1,3}>, Residual2
Order<{2,2}, {1,1}>, Residual3
(OID: 1, NO 2 AND OID: 2, NO. 3 ) is one key
(OID: 2, NO 3 AND OID: 4, NO. 3 ) is another key
(OID: 1, NO 2 AND OID: 2, NO. 3, OID:6, No.1 ) is one key
(OID: 2, NO 3 AND OID: 4, NO. 3, OID:6, No.1 ) is another key