1 13 package com.tonbeller.jpivot.olap.model.impl; 14 15 import com.tonbeller.jpivot.olap.model.Cell; 16 import com.tonbeller.jpivot.olap.model.NumberFormat; 17 import com.tonbeller.jpivot.olap.model.Visitor; 18 19 24 public class CellImpl extends PropertyHolderImpl implements Cell { 25 String formattedValue; 26 Object value; 27 28 32 public String getFormattedValue() { 33 return formattedValue; 34 } 35 36 40 public Object getValue() { 41 return value; 42 } 43 44 48 public void setFormattedValue(String formattedValue) { 49 this.formattedValue = formattedValue; 50 } 51 52 56 public void setValue(Object value) { 57 this.value = value; 58 } 59 60 public boolean isNull() { 61 return value == null; 62 } 63 64 public void accept(Visitor visitor) { 65 visitor.visitCell(this); 66 } 67 68 public Object getRootDecoree() { 69 return this; 70 } 71 72 public NumberFormat getFormat() { 73 if (value instanceof Number ) 74 return new NumberFormatImpl(); 75 return null; 76 } 77 78 } 79 | Popular Tags |