title: Conditionally add "optional items" with array initialization syntax?
body: <p>I'm wondering if I can easily have an if statement somehow here:</p>
  
  <pre><code>public Object[] tableItemFromVisit(Visit visit, boolean editable) {
      return new Object[] {
              visit.getIdVisit(),
              visit.getProfession().getProfessionName(),
              visit.getSpiProfessional().getFullName(),
              RegularFunctions.getTimeFormat().format(visit.getVisitDate()),
              RegularFunctions.toNormalCapitalizedText(visit.getVisitState()
                      .toString()), visit.getReason(), 
              if (editable) { "Edit" }, 
              };
  }
  </code></pre>
  
  <p>How is this structure even called? An array specification or what?
  Anyway if the variable "editable" is true, it has to have an "Edit" string, if it's false, it doesn't need anything...
  Obviously I don't want to write two return statements that are way too similar to each other...</p>