public DeweyNumber increase ( int times ) { int [ ] newDeweyNumber = Arrays . copyOf ( deweyNumber , deweyNumber . length ) ; newDeweyNumber [ deweyNumber . length - 1 ] += times ; return new DeweyNumber ( newDeweyNumber ) ; }
Creates a new dewey number from this such that its last digit is increased by the supplied number .