private int calculateTotalWidth(float starSize,int numberOfStars,float starsSeparation,boolean padding){
  return Math.round(starSize * numberOfStars + starsSeparation * (numberOfStars - 1)) + (padding ? getPaddingLeft() + getPaddingRight() : 0);
}

private int calculateTotalWidth ( float starSize , int numberOfStars , float starsSeparation , boolean padding ) { return Math . round ( starSize * numberOfStars + starsSeparation * ( numberOfStars - 1 ) ) + ( padding ? getPaddingLeft ( ) + getPaddingRight ( ) : 0 ) ; }
calculates total width to occupy based on several parameters
