1 package com.sharkysoft.printf; 2 3 import com.sharkysoft.util.MutableInteger; 4 5 final class Formatter_n extends Formatter 6 { 7 8 Formatter_n(final FormatSpecifier ipPfs) 9 { 10 super(); 11 } 12 13 void format(final PrintfState ipPs) 14 { 15 MutableInteger mi = (MutableInteger) ipPs.mapArgs[ipPs.mnArgIndex++]; 16 mi.setValue(new Integer(ipPs.mpOutput.length())); 17 } 18 19 int argsRequired() 20 { 21 return 1; 22 } 23 24 Class[] argTypes() { 25 return new Class[] { MutableInteger.class }; 26 } 27 28 } 29