package com.kurukurupapa.tryandroiddb.db003.model;

import java.util.List;

public class RecordListAdapter {
	private List<Record> list;

	public RecordListAdapter(List<Record> list) {
		this.list = list;
	}

	public String getText() {
		StringBuilder sb = new StringBuilder();
		for (Record e : list) {
			sb.append(e.toString() + "\n");
		}
		return sb.toString();
	}

	public Record getLast() {
		Record record = null;
		if (list.size() > 0) {
			record = list.get(list.size() - 1);
		}
		return record;
	}

	public boolean hasData() {
		return list.size() > 0;
	}
}
