content: import java.util.List;
  
  import static java.util.Arrays.asList;
  import static java.util.Arrays.stream;
  
  enum Digit {
  
      ZERO(asList(" _ ",
                  "| |",
                  "|_|")),
  
      ONE(asList("   ",
                 "  |",
                 "  |")),
  
      TWO(asList(" _ ",
                 " _|",
                 "|_ ")),
  
      THREE(asList(" _ ",
                   " _|",
                   " _|")),
  
      FOUR(asList("   ",
                  "|_|",
                  "  |")),
  
      FIVE(asList(" _ ",
                  "|_ ",
                  " _|")),
  
      SIX(asList(" _ ",
                 "|_ ",
                 "|_|")),
  
      SEVEN(asList(" _ ",
                   "  |",
                   "  |")),
  
      EIGHT(asList(" _ ",
                   "|_|",
                   "|_|")),
  
      NINE(asList(" _ ",
                  "|_|",
                  " _|"));
  
      private final List<String> ssdRepresentation;
  
      Digit(List<String> ssd) {
          this.ssdRepresentation = ssd;
      }
  
      static String fromSsdConfiguration(final List<String> ssdConfiguration) {
          return stream(values())
                  .filter(digit -> digit.ssdRepresentation.equals(ssdConfiguration))
                  .map(Digit::ordinal)
                  .map(Object::toString)
                  .findFirst()
                  .orElse("?");
      }
  
  }
  