docs: public static ASN1Set getInstance(
          ASN1TaggedObject    obj,
          boolean             explicit)
      {
          if (explicit)
          {
              if (!obj.isExplicit())
              {
                  throw new IllegalArgumentException("object implicit - explicit expected.");
              }
  
              return (ASN1Set)obj.getObject();
          }
          else
          {
              //
              // constructed object which appears to be explicitly tagged
              // and it's really implicit means we have to add the
              // surrounding sequence.
              //
              if (obj.isExplicit())
              {
                  ASN1Set    set = new DERSet(obj.getObject());
  
                  return set;
              }
              else
              {
                  if (obj.getObject() instanceof ASN1Set)
                  {
                      return (ASN1Set)obj.getObject();
                  }
  
                  //
                  // in this case the parser returns a sequence, convert it
                  // into a set.
                  //
                  ASN1EncodableVector  v = new ASN1EncodableVector();
  
                  if (obj.getObject() instanceof ASN1Sequence)
                  {
                      ASN1Sequence s = (ASN1Sequence)obj.getObject();
                      Enumeration e = s.getObjects();
  
                      while (e.hasMoreElements())
                      {
                          v.add((DEREncodable)e.nextElement());
                      }
  
                      return new DERSet(v, false);
                  }
              }
          }
  
          throw new IllegalArgumentException(
                      "unknown object in getInstanceFromTagged");
      }