001 /* 002 // $Id: //open/mondrian/src/main/mondrian/olap/CellFormatter.java#6 $ 003 // This software is subject to the terms of the Common Public License 004 // Agreement, available at the following URL: 005 // http://www.opensource.org/licenses/cpl.html. 006 // Copyright (C) 2004-2005 TONBELLER AG 007 // All Rights Reserved. 008 // You must accept the terms of that agreement to use this software. 009 */ 010 package mondrian.olap; 011 012 /** 013 * This interface provides a user exit to format 014 * the cell value to be displayed. The user registers the CellFormatter's 015 * full class name as an attribute of a Measure in the schema file. 016 * A single instance of the CellFormatter is created for the Measure. 017 * <p> 018 * It is important that different CellFormatter's, CellFormatter that will 019 * be used to format different Measures in different ways, implement 020 * the <code>equals</code> and <code>hashCode</code> methods so that 021 * the different CellFormatter are not treated as being the same in 022 * a java.util.Collection. 023 */ 024 public interface CellFormatter { 025 026 /** 027 * user provided cell formatting function 028 * @param value 029 * @return the formatted value 030 */ 031 String formatCell(Object value); 032 033 } 034 035 // End CellFormatter.java 036