集册 Java实例教程 确定核苷酸序列的倒序。

确定核苷酸序列的倒序。

欢马劈雪     最近更新时间:2020-01-02 10:19:05

512
确定核苷酸序列的倒序。

/*

 **  DNAUtils

 **  (c) Copyright 1997, Neomorphic Sofware, Inc.

 **  All Rights Reserved

 **

 **  CONFIDENTIAL

 **  DO NOT DISTRIBUTE

 **

 **  File: DNAUtils.java

 **

 */

//package com.nowjava;/**时 代 J a v a - N o w J a v a . c o m**/


public class Main {

    /**

     * determines the reverse of a sequence of nucleotides.

     *

     * @param s a string of nucleotide codes.

     * @return the codes in reverse order.

     */

    public static String reverse(String s) {

        if (s == null) {

            return null;

        }

        StringBuffer buf = new StringBuffer(s.length());

        //    int j=0;

        for (int i = s.length() - 1; i >= 0; i--) {

            b
展开阅读全文