Class SubArrays


  • public final class SubArrays
    extends java.lang.Object
    Functionality similar to class Arrays, but which can work on parts of arrays.

    Synchronization

    This class represents a namespace and does not contain instance data or mutable static data. It is therefore threadsafe.
    • Constructor Summary

      Constructors 
      Constructor Description
      SubArrays()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean arrayCompare​(byte[] a1, int a1start, byte[] a2, int a2start, int numToCompare)  
      static boolean stringBufferCompare​(java.lang.StringBuffer a1, int a1start, java.lang.StringBuffer a2, int a2start, int numToCompare)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SubArrays

        public SubArrays()
    • Method Detail

      • arrayCompare

        public static boolean arrayCompare​(byte[] a1,
                                           int a1start,
                                           byte[] a2,
                                           int a2start,
                                           int numToCompare)
        Parameters:
        a1 - The first buffer to compare
        a1start - The offset into a1 to begin comparing
        a2 - The second buffer to compare
        a2start - The offset into a2 to begin comparing
        numToCompare - If numToCompare extends beyond the end of a1 and a2, arrayCompare only compares to the end of the buffers.
        Returns:
        true if the subarrays are the same, false otherwise
      • stringBufferCompare

        public static boolean stringBufferCompare​(java.lang.StringBuffer a1,
                                                  int a1start,
                                                  java.lang.StringBuffer a2,
                                                  int a2start,
                                                  int numToCompare)