code: protected void revalidateSelection(int rating) {
          for (MaterialIcon icon : iconList) {
              icon.removeStyleName(AddinsCssName.MATERIAL_RATING_UNSELECTED);
              icon.removeStyleName(AddinsCssName.MATERIAL_RATING_SELECTED);
          }
  
          for (int i = 0; i < rating && i < iconList.size(); i++) {
              MaterialIcon icon = iconList.get(i);
              icon.setIconType(selectedRatingIcon);
              icon.addStyleName(AddinsCssName.MATERIAL_RATING_SELECTED);
          }
  
          for (int i = rating; i < iconList.size(); i++) {
              MaterialIcon icon = iconList.get(i);
              icon.setIconType(unselectedRatingIcon);
              icon.addStyleName(AddinsCssName.MATERIAL_RATING_UNSELECTED);
          }
      }
docs: Method called internally by the component to revalidade selections by the
  user, switching the icons accordingly.