Produce an object suitable for an ASN1OutputStream.
<pre>
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
</pre>
347957
public DERObject toASN1Object()
    {
        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(objectId);

        if (parametersDefined)
        {
            v.add(parameters);
        }

        return new DERSequence(v);
    }
487847
def from_sequence(cls, sequence, phos_3_prime=False):
        
        strand1 = NucleicAcidStrand(sequence, phos_3_prime=phos_3_prime)
        duplex = cls(strand1)
        return duplex
1285317
static <T, S extends Sequence> Comparator<T>
    getComparatorOfObjectsRegardingSequences(final Comparator<T> objectComparator, final SequenceExtractor<T, S> extractor) {
        return new Comparator<T>() {
            @Override
            public int compare(T o1, T o2) {
                int i = objectComparator.compare(o2, o1);  // Reverse comparison
                return i == 0 ?
                        extractor.getSequence(o2).compareTo(extractor.getSequence(o1))
                        : i;
            }
        };
    }
419373
public DERObject toASN1Object()
    {
        ASN1EncodableVector v = new ASN1EncodableVector();

        v.add(policyIdentifier);

        if (policyQualifiers != null)
        {
            v.add(policyQualifiers);
        }

        return new DERSequence(v);
    }
158107
public static <A, B, C, T> Parser<T> sequence(
      final Parser<A> p1, final Parser<B> p2, final Parser<C> p3,
      final Map3<? super A, ? super B, ? super C, ? extends T> map) {
    return new Parser<T>() {
      @Override boolean apply(ParseContext ctxt) {
        boolean r1 = p1.apply(ctxt);
        if (!r1) return false;
        A o1 = p1.getReturn(ctxt);
        boolean r2 = p2.apply(ctxt);
        if (!r2) return false;
        B o2 = p2.getReturn(ctxt);
        boolean r3 = p3.apply(ctxt);
        if (!r3) return false;
        C o3 = p3.getReturn(ctxt);
        ctxt.result = map.map(o1, o2, o3);
        return true;
      }
      @Override public String toString() {
        return map.toString();
      }
    };
  }
514531
public function toASN1(): Sequence
    {
        $elements = [];
        if (isset($this->_baseCertificateID)) {
            $elements[] = new ImplicitlyTaggedType(0,
                $this->_baseCertificateID->toASN1());
        }
        if (isset($this->_entityName)) {
            $elements[] = new ImplicitlyTaggedType(1,
                $this->_entityName->toASN1());
        }
        if (isset($this->_objectDigestInfo)) {
            $elements[] = new ImplicitlyTaggedType(2,
                $this->_objectDigestInfo->toASN1());
        }
        return new Sequence(...$elements);
    }
997192
def is_sequence(obj):
    """"""
    return isinstance(obj, Sequence) and not (
        isinstance(obj, str) or BinaryClass.is_valid_type(obj))
485029
public String getSequence(Long beginPosition, Long endPosition)
	{
		byte[] sequenceByte = getSequenceByte(beginPosition, endPosition);
		if (sequenceByte != null)
			return new String(sequenceByte);
		return null;
	}
839224
public function toASN1(): Sequence
    {
        $elements = array(new ObjectIdentifier($this->_oid));
        if (count($this->_qualifiers)) {
            $qualifiers = array_map(
                function (PolicyQualifierInfo $pqi) {
                    return $pqi->toASN1();
                }, array_values($this->_qualifiers));
            $elements[] = new Sequence(...$qualifiers);
        }
        return new Sequence(...$elements);
    }
926678
@Override
    public DigestCalculator get(final AlgorithmIdentifier algorithmIdentifier) throws OperatorCreationException
    {
        final Digest digest = getFactory(algorithmIdentifier.getAlgorithm()).getInstance();

        if (digest instanceof DigestCalculator) {
            return (DigestCalculator) digest;
        } else {
            return new DigestCalculator()
            {
                @Override
                public AlgorithmIdentifier getAlgorithmIdentifier()
                {
                    return algorithmIdentifier;
                }

                @Override
                public OutputStream getOutputStream()
                {
                    return digest.getOutputStream();
                }

                @Override
                public byte[] getDigest()
                {
                    return digest.digest();
                }
            };
        }
    }
352302
public function toASN1(): Sequence
    {
        $elements = array_map(
            function (RDN $rdn) {
                return $rdn->toASN1();
            }, $this->_rdns);
        return new Sequence(...$elements);
    }
952584
@NotNull
	public static Promise<Void> sequence(@NotNull AsyncSupplier<Void> promise) {
		return promise.get().toVoid();
	}
608561
public FastqBuilder withSequence(final String sequence)
	{
		if (sequence == null)
		{
			throw new IllegalArgumentException("sequence must not be null");
		}
		if (this.sequence == null)
		{
			this.sequence = new StringBuilder(sequence.length());
		}
		this.sequence.replace(0, this.sequence.length(), sequence);
		return this;
	}
344142
public function toASN1(): Sequence
    {
        return new Sequence($this->_certificationRequestInfo->toASN1(),
            $this->_signatureAlgorithm->toASN1(), $this->_signature->bitString());
    }
104515
def target_sequence(self):
        # type: () -> SeqRecord
        
        if self.cutter.is_3overhang():
            start, end = self._match.span(2)[0], self._match.span(3)[1]
        else:
            start, end = self._match.span(1)[0], self._match.span(2)[1]
        return add_as_source(self.record, (self.record << start)[end - start :])
714819
public static function fromASN1(Sequence $seq): self
    {
        $attribs = array_map(
            function (UnspecifiedType $el) {
                return Attribute::fromASN1($el->asSequence());
            }, $seq->elements());
        // cast attributes
        $attribs = array_map(
            function (Attribute $attr) {
                $oid = $attr->oid();
                if (array_key_exists($oid, self::MAP_OID_TO_CLASS)) {
                    $cls = self::MAP_OID_TO_CLASS[$oid];
                    $attr = $attr->castValues($cls);
                }
                return $attr;
            }, $attribs);
        return new self(...$attribs);
    }
624833
@Override
    public Object mapSequence(Object sequence) {
        List<List<Long>> seq = (List<List<Long>>) sequence;
        List<Long> ret = new ArrayList<>();
        for (List<Long> l : seq)
            ret.add((Long) map(l));
        return ret;
    }