public void addRootBlock(Block block,boolean isNewBlock){
  if (block == null) {
    throw new IllegalArgumentException("Cannot add a null block as a root block");
  }
  if (block.getPreviousBlock() != null) {
    throw new IllegalArgumentException("Root blocks may not have a previous block");
  }
  if (mRootBlocks.contains(block)) {
    throw new IllegalArgumentException("Block is already a root block.");
  }
  mRootBlocks.add(block);
  if (isNewBlock) {
    mStats.collectStats(block,true);
  }
}

public void addRootBlock ( Block block , boolean isNewBlock ) { if ( block == null ) { throw new IllegalArgumentException ( "Cannot add a null block as a root block" ) ; } if ( block . getPreviousBlock ( ) != null ) { throw new IllegalArgumentException ( "Root blocks may not have a previous block" ) ; } if ( mRootBlocks . contains ( block ) ) { throw new IllegalArgumentException ( "Block is already a root block." ) ; } mRootBlocks . add ( block ) ; if ( isNewBlock ) { mStats . collectStats ( block , true ) ; } }
adds a new block to the workspace as a root block .
