- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {}
public Color getColor() { if (appearance instanceof YoAppearanceRGBColor) { YoAppearanceRGBColor yoAppearanceRGBColor = (YoAppearanceRGBColor) appearance; Color color = new Color(yoAppearanceRGBColor.getRed(), yoAppearanceRGBColor.getGreen(), yoAppearanceRGBColor.getBlue()); return color; } else { throw new RuntimeException("No color defined"); } }
public Color getColor() { if (this.appearance instanceof YoAppearanceRGBColor) { YoAppearanceRGBColor yoAppearanceRGBColor = (YoAppearanceRGBColor) this.appearance; Color color = new Color(yoAppearanceRGBColor.getRed(), yoAppearanceRGBColor.getGreen(), yoAppearanceRGBColor.getBlue()); return color; } else { throw new RuntimeException("No color defined"); } }