[wpilibj] Suppress unchecked cast warnings (#2995)

This commit is contained in:
Tyler Veness
2020-12-28 17:13:34 -08:00
committed by GitHub
parent b8413ddd5b
commit 8c8ec5e63e
2 changed files with 4 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ public abstract class ShuffleboardComponent<C extends ShuffleboardComponent<C>>
* @param properties the properties for this component
* @return this component
*/
@SuppressWarnings("unchecked")
public final C withProperties(Map<String, Object> properties) {
m_properties = properties;
m_metadataDirty = true;
@@ -87,6 +88,7 @@ public abstract class ShuffleboardComponent<C extends ShuffleboardComponent<C>>
* @param rowIndex the row in the tab to place this component
* @return this component
*/
@SuppressWarnings("unchecked")
public final C withPosition(int columnIndex, int rowIndex) {
m_column = columnIndex;
m_row = rowIndex;
@@ -102,6 +104,7 @@ public abstract class ShuffleboardComponent<C extends ShuffleboardComponent<C>>
* @param height how many rows high the component should be
* @return this component
*/
@SuppressWarnings("unchecked")
public final C withSize(int width, int height) {
m_width = width;
m_height = height;

View File

@@ -39,6 +39,7 @@ abstract class ShuffleboardWidget<W extends ShuffleboardWidget<W>>
* @param widgetType the type of the widget used to display the data
* @return this widget object
*/
@SuppressWarnings("unchecked")
public final W withWidget(String widgetType) {
setType(widgetType);
return (W) this;