1 28 package net.sf.jasperreports.olap.mapping; 29 30 import java.util.Iterator ; 31 import java.util.List ; 32 33 34 38 public class DataMapping implements Mapping 39 { 40 private final boolean formatted; 41 private final List filter; 42 private final List positions; 43 44 public DataMapping(boolean formatted, List filter, List positions) 45 { 46 this.formatted = formatted; 47 this.filter = filter; 48 this.positions = positions; 49 } 50 51 52 public List getFilter() 53 { 54 return filter; 55 } 56 57 public boolean isFormatted() 58 { 59 return formatted; 60 } 61 62 public List getPositions() 63 { 64 return positions; 65 } 66 67 public Iterator memberMappings() 68 { 69 return filter == null ? new EmptyIt() : filter.iterator(); 70 } 71 72 protected static class EmptyIt implements Iterator 73 { 74 public void remove() 75 { 76 throw new UnsupportedOperationException (); 77 } 78 79 public boolean hasNext() 80 { 81 return false; 82 } 83 84 public Object next() 85 { 86 return null; 87 } 88 } 89 } 90 | Popular Tags |