code: public JingleContent getSoleContentOrThrow() {
          if (contents.isEmpty()) {
              return null;
          }
  
          if (contents.size() > 1) {
              throw new IllegalStateException();
          }
  
          return contents.get(0);
      }
docs: Get the only jingle content if one exists, or <code>null</code>. This method will throw an
  {@link IllegalStateException} if there is more than one jingle content.
  
  @return a JingleContent instance or <code>null</code>.
  @throws IllegalStateException if there is more than one jingle content.