001package org.hl7.fhir.r5.utils.sql;
002
003import java.util.ArrayList;
004import java.util.List;
005
006
007public class Cell {
008  private Column column; 
009  private List<Value> values = new ArrayList<>();
010
011  public Cell(Column column) {
012    super();
013    this.column = column;
014  }
015  
016  public Cell(Column column, Value value) {
017    super();
018    this.column = column;
019    this.values.add(value);
020  }
021  
022  public Column getColumn() {
023    return column;
024  }
025  
026  public List<Value> getValues() {
027    return values;
028  }
029
030  public Cell copy() {
031    Cell cell = new Cell(column);
032    for (Value v : values) {
033      cell.values.add(v); // values are immutable, so we don't need to clone them
034    }
035    return cell;
036  }
037
038
039}