Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.0
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.runtime
Class DefaultGroovyMethodsSupport

    java.lang.Object
      org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport

    class DefaultGroovyMethodsSupport
    extends Object

Support methods for DefaultGroovyMethods and PluginDefaultMethods.

Nested Class Summary
`class` | `DefaultGroovyMethodsSupport.RangeInfo`

Constructor Summary
`DefaultGroovyMethodsSupport()`

Method Summary
`protected static Collection` | `cloneSimilarCollection(Collection orig, int newCapacity)`
`protected static Map` | `cloneSimilarMap(Map orig)`
`static void` | `closeQuietly(Closeable c)` Close the Closeable.
`static void` | `closeWithWarning(Closeable c)` Close the Closeable.
`protected static Collection` | `createSimilarCollection(Collection collection)`
`protected static Collection` | `createSimilarCollection(Collection orig, int newCapacity)`
`protected static List` | `createSimilarList(List orig, int newCapacity)`
`protected static Map` | `createSimilarMap(Map orig)`
`protected static Collection` | `createSimilarOrDefaultCollection(Object object)`
`protected static Set` | `createSimilarSet(Set orig)`
`protected static int` | `normaliseIndex(int i, int size)` This converts a possibly negative index to a real index into the array.
`protected static boolean` | `sameType(Collection[] cols)` Determines if all items of this array are of the same type.
`protected static RangeInfo` | `subListBorders(int size, Range range)`
`protected static RangeInfo` | `subListBorders(int size, EmptyRange range)`

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Constructor Detail

### DefaultGroovyMethodsSupport

    DefaultGroovyMethodsSupport()

Method Detail

### cloneSimilarCollection

    protected static Collection cloneSimilarCollection(Collection orig, int newCapacity)

### cloneSimilarMap

    protected static Map cloneSimilarMap(Map orig)

### closeQuietly

    public static void closeQuietly(Closeable c)

  Close the Closeable. Ignore any problems that might occur.
  param:
    c the thing to close

### closeWithWarning

    public static void closeWithWarning(Closeable c)

  Close the Closeable. Logging a warning if any problems occur.
  param:
    c the thing to close

### createSimilarCollection

    protected static Collection createSimilarCollection(Collection collection)

### createSimilarCollection

    protected static Collection createSimilarCollection(Collection orig, int newCapacity)

### createSimilarList

    protected static List createSimilarList(List orig, int newCapacity)

### createSimilarMap

    protected static Map createSimilarMap(Map orig)

### createSimilarOrDefaultCollection

    protected static Collection createSimilarOrDefaultCollection(Object object)

### createSimilarSet

    protected static Set createSimilarSet(Set orig)

### normaliseIndex

    protected static int normaliseIndex(int i, int size)

  This converts a possibly negative index to a real index into the array.
  param:
    i the unnormalised index
  param:
    size the array size
  return:
    the normalised index

### sameType

    protected static boolean sameType(Collection[] cols)

  Determines if all items of this array are of the same type.
  param:
    cols an array of collections
  return:
    true if the collections are all of the same type

### subListBorders

    protected static RangeInfo subListBorders(int size, Range range)

### subListBorders

    protected static RangeInfo subListBorders(int size, EmptyRange range)

Copyright © 2003-2009 The Codehaus. All rights reserved.