Java Array Min Value maxLength(T[] array)

Here you can find the source of maxLength(T[] array)

Description

max Length

License

Apache License

Declaration

public static <T extends CharSequence> int maxLength(T[] array) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {

    public static int maxLength(Collection<? extends CharSequence> coll) {
        int re = 0;
        if (null != coll)
            for (CharSequence s : coll)
                if (null != s)
                    re = Math.max(re, s.length());
        return re;
    }//from   w  w  w.j  a v  a2  s  . c  om

    public static <T extends CharSequence> int maxLength(T[] array) {
        int re = 0;
        if (null != array)
            for (CharSequence s : array)
                if (null != s)
                    re = Math.max(re, s.length());
        return re;
    }
}

Related

  1. findMin2(int[] workArray, int idx, int min)
  2. findMinAndMax(double[] array)
  3. findMinAndMax(float[] buffer, int pixelStride, int numBands)
  4. findMinDiff(double[] values)
  5. findMinIndex(double[] arr, int offset, int length)
  6. maxMinValues(int[] array)
  7. maxMinValues(long[] array)
  8. maxValue(long[] array)
  9. min(byte[] arr)