base = GeneralName.getInstance(seq.getObjectAt(0)); switch (seq.size()) { case 1: break; case 2: ASN1TaggedObject o = (ASN1TaggedObject)seq.getObjectAt(1); switch (o.getTagNo()) { case 0 : minimum = DERInteger.getInstance(o, false); break; case 1 : maximum = DERInteger.getInstance(o, false); break; default: throw new IllegalArgumentException("Bad tag number: " + o.getTagNo()); } break; case 3 : minimum = DERInteger.getInstance((ASN1TaggedObject)seq.getObjectAt(1), false); maximum = DERInteger.getInstance((ASN1TaggedObject)seq.getObjectAt(2), false); break; default: throw new IllegalArgumentException("Bad sequence size: " + seq.size()); }
return base;
ASN1EncodableVector v = new ASN1EncodableVector(); v.add(base); if (minimum != null) { v.add(new DERTaggedObject(false, 0, minimum)); } if (maximum != null) { v.add(new DERTaggedObject(false, 1, maximum)); } return new DERSequence(v);
return new GeneralSubtree(ASN1Sequence.getInstance(o, explicit));
if (obj == null) { return null; } if (obj instanceof GeneralSubtree) { return (GeneralSubtree)obj; } return new GeneralSubtree(ASN1Sequence.getInstance(obj));
if (maximum == null) { return null; } return maximum.getValue();
if (minimum == null) { return BigInteger.valueOf(0); } return minimum.getValue();