@Test(expected = AssertionError.class) public void testInvalidNumberOfAttributesToLarge() { final int numberOfAttributes = 1 + this.r.nextInt(5); Batch b = new Batch(2, numberOfAttributes); Values tuple = new Values(); for(int i = 0; i < numberOfAttributes + 1; ++i) { tuple.add(new Integer(0)); } b.addTuple(new Values()); }
public void addTuple(List<Object> tuple) { assert (tuple != null); assert (tuple.size() == this.numberOfAttributes); assert (this.size < this.batchSize); logger.trace("tuple: {}; size before insert: {}", tuple, new Integer(this.size)); for(int i = 0; i < this.numberOfAttributes; ++i) { this.get(i).add(tuple.get(i)); } ++this.size; }
Batch extends ArrayList<BatchColumn> { public void addTuple(List<Object> tuple) { assert (tuple != null); assert (tuple.size() == this.numberOfAttributes); assert (this.size < this.batchSize); logger.trace("tuple: {}; size before insert: {}", tuple, new Integer(this.size)); for(int i = 0; i < this.numberOfAttributes; ++i) { this.get(i).add(tuple.get(i)); } ++this.size; } }
Batch extends ArrayList<BatchColumn> { public void addTuple(List<Object> tuple) { assert (tuple != null); assert (tuple.size() == this.numberOfAttributes); assert (this.size < this.batchSize); logger.trace("tuple: {}; size before insert: {}", tuple, new Integer(this.size)); for(int i = 0; i < this.numberOfAttributes; ++i) { this.get(i).add(tuple.get(i)); } ++this.size; } Batch();  Batch(int batchSize, int numberOfAttributes); }
Batch extends ArrayList<BatchColumn> { public void addTuple(List<Object> tuple) { assert (tuple != null); assert (tuple.size() == this.numberOfAttributes); assert (this.size < this.batchSize); logger.trace("tuple: {}; size before insert: {}", tuple, new Integer(this.size)); for(int i = 0; i < this.numberOfAttributes; ++i) { this.get(i).add(tuple.get(i)); } ++this.size; } Batch();  Batch(int batchSize, int numberOfAttributes); void addTuple(List<Object> tuple); boolean isFull(); @Override boolean isEmpty(); }
Batch extends ArrayList<BatchColumn> { public void addTuple(List<Object> tuple) { assert (tuple != null); assert (tuple.size() == this.numberOfAttributes); assert (this.size < this.batchSize); logger.trace("tuple: {}; size before insert: {}", tuple, new Integer(this.size)); for(int i = 0; i < this.numberOfAttributes; ++i) { this.get(i).add(tuple.get(i)); } ++this.size; } Batch();  Batch(int batchSize, int numberOfAttributes); void addTuple(List<Object> tuple); boolean isFull(); @Override boolean isEmpty();  }