01: package org.pnuts.lib;
02:
03: import pnuts.lang.Context;
04: import java.io.*;
05: import java.util.*;
06:
07: class MerlinCounter extends Counter {
08: public Number size(Object a, Context context) {
09: if (a instanceof CharSequence) {
10: return new Integer(((CharSequence) a).length());
11: } else {
12: return super.size(a, context);
13: }
14: }
15: }
|