private static int writeSize(List<? extends OffsettedItem> items){
  OffsettedItem first=items.get(0);
  return (items.size() * first.writeSize()) + getAlignment(items);
}

private static int writeSize ( List < ? extends OffsettedItem > items ) { OffsettedItem first = items . get ( 0 ) ; return ( items . size ( ) * first . writeSize ( ) ) + getAlignment ( items ) ; }
calculates the write size for the given list .
