Class VectorHelpers


  • public final class VectorHelpers
    extends java.lang.Object
    Helper methods for implementers of custom Vectors.

    If you are implementing a custom Vector, your equals and hashCode methods SHOULD delegate to vectorEquals and vectorHashCode, respectively. This will ensure that equality works correctly with the built-in Vector types.

    Your toString method MAY delegate to vectorToString.

    • Method Detail

      • vectorEquals

        public static boolean vectorEquals​(Vector<?> vector,
                                           Vector<?> other)
      • vectorHashCode

        public static int vectorHashCode​(Vector<?> vector)
      • vectorIterator

        public static <A> java.util.Iterator<A> vectorIterator​(Vector<A> vector)
      • vectorToString

        public static java.lang.String vectorToString​(Vector<?> vector)