/**
  * Creates a new instance based on a given {@link COSDictionary}.
  *
  * @param dict the dictionary
  */
 public PDOptionalContentGroup(COSDictionary dict) {
   if (!dict.getItem(COSName.TYPE).equals(COSName.OCG)) {
     throw new IllegalArgumentException(
         "Provided dictionary is not of type '" + COSName.OCG + "'");
   }
   this.ocg = dict;
 }