Package io.opentelemetry.sdk.internal
Class PrimitiveLongList
- java.lang.Object
-
- io.opentelemetry.sdk.internal.PrimitiveLongList
-
public final class PrimitiveLongList extends java.lang.Object
A list of longs backed by, and exposing, an array of primitives. Values will be boxed on demand when using standard List operations. Operations should generally use the static methods in this class to operate directly on the backing array instead. The idea is that in almost all apps, the list will only be accessed by our internal code, and if it does happen to be used elsewhere, performance of on-demand boxing isn't prohibitive while still providing expected ergonomics.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PrimitiveLongList.LongListImpl
-
Constructor Summary
Constructors Modifier Constructor Description private
PrimitiveLongList()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long[]
toArray(java.util.List<java.lang.Long> list)
Returns a primitive array with the values of the list.static java.util.List<java.lang.Long>
wrap(long[] values)
Returns a list that wraps the primitive array.
-
-
-
Method Detail
-
wrap
public static java.util.List<java.lang.Long> wrap(long[] values)
Returns a list that wraps the primitive array. Modifications in the array will be visible in the list.
-
toArray
public static long[] toArray(java.util.List<java.lang.Long> list)
Returns a primitive array with the values of the list. The list should generally have been created withwrap(long[])
.
-
-