1 28 package net.sf.jasperreports.olap.mapping; 29 30 import java.util.ArrayList ; 31 import java.util.Iterator ; 32 import java.util.List ; 33 34 35 39 public class Tuple 40 { 41 private final List members; 42 43 public Tuple () 44 { 45 this.members = new ArrayList (); 46 } 47 48 public Tuple (TupleMember member) 49 { 50 this.members = new ArrayList (1); 51 addMember(member); 52 } 53 54 public void addMember (TupleMember member) 55 { 56 members.add(member); 57 } 58 59 public List getMembers () 60 { 61 return members; 62 } 63 64 public String [] getMemberUniqueNames () 65 { 66 String [] names = new String [members.size()]; 67 Iterator it = members.iterator(); 68 for (int i = 0; i < names.length; ++i) 69 { 70 TupleMember member = (TupleMember) it.next(); 71 names[i] = member.getUniqueName(); 72 } 73 return names; 74 } 75 } 76 | Popular Tags |