Package org.n52.io
Class Utils
java.lang.Object
org.n52.io.Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]copy(T[] source) Copies an array viaSystem.arraycopy(Object, int, Object, int, int).
-
Method Details
-
copy
public static <T> T[] copy(T[] source) Copies an array via
System.arraycopy(Object, int, Object, int, int). This is useful for objects encapsulating arrays from being externally modified.Note: No deep copy is made.
- Type Parameters:
T- the source's type- Parameters:
source- the array to copy.- Returns:
- a copied instance of the array.
-