public class Main {
    public static void main(String[] args) {
        
        Column[] columns = {
                // 列の型, 列の名前
                new Column(Table.Type.Integer, "レス番号"),
                new Column(Table.Type.String, "名前"),
                new Column(Table.Type.String, "メール"),
        };
        
        Table table = new Table(columns);
        // さきほどの列の定義に従って、レス番号、名前、メールの組をテーブルに追加
        table.insert(324, "名無しさん", "sage");
        table.insert(412, "コテハン", "age");
        
       // テーブルの全てのレコードを取得して画面に表示
        for (int i = 0; i < table.getAllRecords().length; i++){
            Object[] records = table.select(i);
            for (int j = 0; j < records.length; j++){
                switch (table.getType(j)) {
                case String:
                    System.out.println(table.getAttribute(j) + " : " + (String)records[j]);
                    break;
                case Integer:
                    System.out.println(table.getAttribute(j) + " : " + (Integer)records[j]);
                    break;
                default:
                    break;
                }
            }
            System.out.println();
        }
    }
}