@Test(expected = IllegalArgumentException.class) public void testThatAddColumnsMethodThrowsExceptionWhenInputIsNull() { new Table("users").addColumns(null); }
public Table addColumns(Collection<Column> newColumns) { checkArgument(newColumns != null, "You must specify a 'newColumns'."); newColumns.forEach(this::addColumn); return this; }
Table implements Copyable<Table>, Comparable<Table> { public Table addColumns(Collection<Column> newColumns) { checkArgument(newColumns != null, "You must specify a 'newColumns'."); newColumns.forEach(this::addColumn); return this; } }
Table implements Copyable<Table>, Comparable<Table> { public Table addColumns(Collection<Column> newColumns) { checkArgument(newColumns != null, "You must specify a 'newColumns'."); newColumns.forEach(this::addColumn); return this; } Table(String name); }
Table implements Copyable<Table>, Comparable<Table> { public Table addColumns(Collection<Column> newColumns) { checkArgument(newColumns != null, "You must specify a 'newColumns'."); newColumns.forEach(this::addColumn); return this; } Table(String name); Table addIndex(Index index); boolean containsIndex(String... columns); boolean containsIndex(Collection<String> columns); Index removeIndex(String... columns); Index removeIndex(Collection<String> columns); Index getIndex(String... columns); Index getIndex(Collection<String> columns); ImmutableList<Index> getIndexes(); Table addColumn(Column column); Table addColumns(Collection<Column> newColumns); Column getColumn(String columnName); List<Column> getIdentityColumns(); boolean containsColumn(String columnName); Column removeColumn(String columnName); ImmutableList<Column> getColumns(); ForeignKeyBuilder addForeignKey(String... referringColumns); ForeignKeyBuilder addForeignKey(List<String> referringColumns); Table rename(String newName); boolean referencesTable(String tableName); Set<String> enumerateReferencedByTables(); @Override Table copy(); @Override int compareTo(Table o); @Override String toString(); }
Table implements Copyable<Table>, Comparable<Table> { public Table addColumns(Collection<Column> newColumns) { checkArgument(newColumns != null, "You must specify a 'newColumns'."); newColumns.forEach(this::addColumn); return this; } Table(String name); Table addIndex(Index index); boolean containsIndex(String... columns); boolean containsIndex(Collection<String> columns); Index removeIndex(String... columns); Index removeIndex(Collection<String> columns); Index getIndex(String... columns); Index getIndex(Collection<String> columns); ImmutableList<Index> getIndexes(); Table addColumn(Column column); Table addColumns(Collection<Column> newColumns); Column getColumn(String columnName); List<Column> getIdentityColumns(); boolean containsColumn(String columnName); Column removeColumn(String columnName); ImmutableList<Column> getColumns(); ForeignKeyBuilder addForeignKey(String... referringColumns); ForeignKeyBuilder addForeignKey(List<String> referringColumns); Table rename(String newName); boolean referencesTable(String tableName); Set<String> enumerateReferencedByTables(); @Override Table copy(); @Override int compareTo(Table o); @Override String toString();  }