Code example for Collection

Methods: addAll

0
    public void add(BaseBlock block) {
        blocks.add(block);
    } 
 
    public void addAll(Collection<BaseBlock> blocks) {
        blocks.addAll(blocks);
    } 
 
    @Override 
    public boolean matches(EditSession editSession, Vector pos) {
        BaseBlock block = editSession.getBlock(pos);
        return  blocks.contains(block)
                || blocks.contains(new BaseBlock(block.getType(), -1));
   } 
}