## org.apache.lucene.util
Class ArrayUtil

    java.lang.Object
      org.apache.lucene.util.ArrayUtil

    public final class ArrayUtil

extends Object

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Constructor Summary
`ArrayUtil()`

Method Summary
`static int` `getNextSize(int targetSize)`
`static int` `getShrinkSize(int currentSize, int targetSize)`
`static byte[]` `grow(byte[] array)`
`static byte[]` `grow(byte[] array, int minSize)`
`static int[]` `grow(int[] array)`
`static int[]` `grow(int[] array, int minSize)`
`static long[]` `grow(long[] array)`
`static long[]` `grow(long[] array, int minSize)`
`static int` `hashCode(byte[] array, int start, int end)` Returns hash of chars in range start (inclusive) to end (inclusive)
`static int` `hashCode(char[] array, int start, int end)` Returns hash of chars in range start (inclusive) to end (inclusive)
`static byte[]` `shrink(byte[] array, int targetSize)`
`static int[]` `shrink(int[] array, int targetSize)`
`static long[]` `shrink(long[] array, int targetSize)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ArrayUtil

    public ArrayUtil()

Method Detail

### getNextSize

    public static int getNextSize(int targetSize)

### getShrinkSize

    public static int getShrinkSize(int currentSize,
                                    int targetSize)

### grow

    public static int[] grow(int[] array,
                             int minSize)

### grow

    public static int[] grow(int[] array)

### shrink

    public static int[] shrink(int[] array,
                               int targetSize)

### grow

    public static long[] grow(long[] array,
                              int minSize)

### grow

    public static long[] grow(long[] array)

### shrink

    public static long[] shrink(long[] array,
                                int targetSize)

### grow

    public static byte[] grow(byte[] array,
                              int minSize)

### grow

    public static byte[] grow(byte[] array)

### shrink

    public static byte[] shrink(byte[] array,
                                int targetSize)

### hashCode

    public static int hashCode(char[] array,
                               int start,
                               int end)

  Returns hash of chars in range start (inclusive) to end (inclusive)

### hashCode

    public static int hashCode(byte[] array,
                               int start,
                               int end)

  Returns hash of chars in range start (inclusive) to end (inclusive)

Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.