Object (int row,int column) { TodoPattern pattern=myPatterns.get(row); return switch (column) { // "Icon" column case 0 -> pattern.getAttributes().getIcon(); // "Case Sensitive" column case 1 -> Boolean.valueOf(pattern.isCaseSensitive()); // "Pattern" column case 2 -> pattern.getPatternString(); default -> throw new IllegalArgumentException(); }; }