/** Builds the lookup table. */ private void buildLUT() { LUT = new int[intervalEnd - intervalStart + 1]; CodomainMap map; CodomainMapContext ctx; int v; Iterator i; for (int x = intervalStart; x <= intervalEnd; ++x) { v = x; i = chain.iterator(); while (i.hasNext()) { ctx = (CodomainMapContext) i.next(); map = ctx.getCodomainMap(); map.setContext(ctx); v = map.transform(v); } LUT[x - intervalStart] = v; } }
/** * Overrides the toString method. * * @see Object#toString() */ @Override public String toString() { StringBuffer buf = new StringBuffer(); Iterator i = chain.iterator(); CodomainMapContext mapCtx; int n = chain.size(); int j = 1; while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); buf.append(mapCtx.getCodomainMap()); if (j == n) { buf.append("."); } else { buf.append(", "); } j++; } return buf.toString(); }