001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2004-2005 TONBELLER AG 008// Copyright (C) 2006-2011 Pentaho and others 009// All Rights Reserved. 010*/ 011package mondrian.spi; 012 013/** 014 * An SPI to format the cell values. 015 * 016 * <p>The user registers the CellFormatter's 017 * full class name as an attribute of a Measure in the schema file. 018 * A single instance of the CellFormatter is created for the Measure.</p> 019 * 020 * <p>Since CellFormatters will 021 * be used to format different Measures in different ways, you must implement 022 * the <code>equals</code> and <code>hashCode</code> methods so that 023 * the different CellFormatters are not treated as being the same in 024 * a {@link java.util.Collection}. 025 */ 026public interface CellFormatter { 027 /** 028 * Formats a cell value. 029 * 030 * @param value Cell value 031 * @return the formatted value 032 */ 033 String formatCell(Object value); 034} 035 036// End CellFormatter.java