public long addWrapField ( long instant , int amount ) { int thisValue = get ( instant ) ; int wrappedValue = FieldUtils . getWrappedValue ( thisValue , amount , getMinimumValue ( ) , getMaximumValue ( ) ) ; // copy code from set() to avoid repeat call to get() return instant + ( wrappedValue - thisValue ) * getUnitMillis ( ) ; }
Add to the component of the specified time instant wrapping around within that component if necessary .