Uses of Class
java.lang.Long
Packages that useLong
Package
Description
Provides classes that are fundamental to the design of the Java programming language.
Provides classfile parsing, generation, and transformation library.
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
Generic API for calendar systems other than the default ISO.
Provides classes to print and parse dates and times.
Access to date and time using fields and units, and date time adjusters.
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
Provides the open data types and Open MBean descriptor classes.
Provides the definition of the Timer MBean.
Incubating Feature. Will be removed in a future release.
Uses ofLong injava.lang
Modifier and TypeClassDescriptionfinal class
Modifier and TypeMethodDescriptionstaticLong
Decodes aString
into aLong
.staticLong
Determines thelong
value of the system property with the specified name.staticLong
Determines thelong
value of the system property with the specified name.staticLong
Returns thelong
value of the system property with the specified name.Long.resolveConstantDesc
(MethodHandles.Lookup lookup) Resolves this instance as aConstantDesc
, the result of which is the instance itself.staticLong
Long.valueOf
(long l) Returns aLong
instance representing the specifiedlong
value.staticLong
Returns aLong
object holding the value of the specifiedString
.staticLong
Returns aLong
object holding the value extracted from the specifiedString
when parsed with the radix given by the second argument.Modifier and TypeMethodDescriptionLong.describeConstable()
Returns anOptional
containing the nominal descriptor for this instance, which is the instance itself.Uses ofLong injava.lang.classfile
Methods injava.lang.classfile that returnLongModifier and TypeMethodDescriptiondefaultLong
AnnotationValue.OfLong.resolvedValue()
Returns the resolved long value.Uses ofLong injava.nio.channels
Method parameters injava.nio.channels with type arguments of typeLongModifier and TypeMethodDescriptionabstract <A> void
AsynchronousSocketChannel.read
(ByteBuffer[] dsts, int offset, int length, long timeout,TimeUnit unit, A attachment,CompletionHandler<Long, ? super A> handler) Reads a sequence of bytes from this channel into a subsequence of the given buffers.abstract <A> void
AsynchronousSocketChannel.write
(ByteBuffer[] srcs, int offset, int length, long timeout,TimeUnit unit, A attachment,CompletionHandler<Long, ? super A> handler) Writes a sequence of bytes to this channel from a subsequence of the given buffers.Uses ofLong injava.time.chrono
Method parameters injava.time.chrono with type arguments of typeLongModifier and TypeMethodDescriptionAbstractChronology.resolveDate
(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle) Resolves parsedChronoField
values into a date during parsing.Chronology.resolveDate
(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle) Resolves parsedChronoField
values into a date during parsing.HijrahChronology.resolveDate
(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle) IsoChronology.resolveDate
(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle) Resolves parsedChronoField
values into a date during parsing.JapaneseChronology.resolveDate
(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle) MinguoChronology.resolveDate
(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle) ThaiBuddhistChronology.resolveDate
(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle) Uses ofLong injava.time.format
Method parameters injava.time.format with type arguments of typeLongModifier and TypeMethodDescriptionDateTimeFormatterBuilder.appendText
(TemporalField field,Map<Long, String> textLookup) Appends the text of a date-time field to the formatter using the specified map to supply the text.Uses ofLong injava.time.temporal
Method parameters injava.time.temporal with type arguments of typeLongModifier and TypeMethodDescriptiondefaultTemporalAccessor
TemporalField.resolve
(Map<TemporalField,Long> fieldValues,TemporalAccessor partialTemporal,ResolverStyle resolverStyle) Resolves this field to provide a simpler alternative or a date.Uses ofLong injava.util
Modifier and TypeInterfaceDescriptionstatic interface
An Iterator specialized forlong
values.static interface
A Spliterator specialized forlong
values.Modifier and TypeMethodDescriptiondefaultLong
PrimitiveIterator.OfLong.next()
Returns the next element in the iteration.Modifier and TypeMethodDescriptiondefault void
PrimitiveIterator.OfLong.forEachRemaining
(Consumer<? superLong> action) Performs the given action for each remaining element until all elements have been processed or the action throws an exception.default void
Spliterator.OfLong.forEachRemaining
(Consumer<? superLong> action) Performs the given action for each remaining element, sequentially in the current thread, until all elements have been processed or the action throws an exception.default boolean
Spliterator.OfLong.tryAdvance
(Consumer<? superLong> action) If a remaining element exists: performs the given action on it, returningtrue
; else returnsfalse
.Uses ofLong injava.util.stream
Subinterfaces with type arguments of typeLong injava.util.streamModifier and TypeInterfaceDescriptioninterface
A sequence of primitive long-valued elements supporting sequential and parallel aggregate operations.Methods injava.util.stream that return types with arguments of typeLongModifier and TypeMethodDescriptionLongStream.boxed()
Returns aStream
consisting of the elements of this stream, each boxed to aLong
.Collectors.counting()
Returns aCollector
accepting elements of typeT
that counts the number of input elements.Collectors.summingLong
(ToLongFunction<? super T> mapper) Returns aCollector
that produces the sum of a long-valued function applied to the input elements.Uses ofLong injavax.management.openmbean
Fields injavax.management.openmbean with type parameters of typeLongModifier and TypeFieldDescriptionstatic finalSimpleType
<Long> SimpleType.LONG
TheSimpleType
instance describing values whose Java class name isjava.lang.Long
.Uses ofLong injavax.management.timer
Methods injavax.management.timer that returnLongModifier and TypeMethodDescriptionTimer.getNbOccurences
(Integer id) Gets a copy of the remaining number of occurrences associated to a timer notification.TimerMBean.getNbOccurences
(Integer id) Gets a copy of the remaining number of occurrences associated to a timer notification.Gets a copy of the period (in milliseconds) associated to a timer notification.Gets a copy of the period (in milliseconds) associated to a timer notification.Uses ofLong injdk.incubator.vector
Subclasses with type arguments of typeLong injdk.incubator.vectorModifier and TypeClassDescriptionclass
A specializedVector
representing an ordered immutable sequence oflong
values.Fields injdk.incubator.vector with type parameters of typeLongModifier and TypeFieldDescriptionstatic finalVectorOperators.Conversion
<Byte, Long> VectorOperators.B2L
ConvertbyteVal
to(long)byteVal
.static finalVectorOperators.Conversion
<Double, Long> VectorOperators.D2L
ConvertdoubleVal
to(long)doubleVal
.static finalVectorOperators.Conversion
<Float, Long> VectorOperators.F2L
ConvertfloatVal
to(long)floatVal
.static finalVectorOperators.Conversion
<Integer, Long> VectorOperators.I2L
ConvertintVal
to(long)intVal
.static finalVectorOperators.Conversion
<Long, Byte> VectorOperators.L2B
ConvertlongVal
to(byte)longVal
.static finalVectorOperators.Conversion
<Long, Double> VectorOperators.L2D
ConvertlongVal
to(double)longVal
.static finalVectorOperators.Conversion
<Long, Float> VectorOperators.L2F
ConvertlongVal
to(float)longVal
.static finalVectorOperators.Conversion
<Long, Integer> VectorOperators.L2I
ConvertlongVal
to(int)longVal
.static finalVectorOperators.Conversion
<Long, Short> VectorOperators.L2S
ConvertlongVal
to(short)longVal
.static finalVectorOperators.Conversion
<Double, Long> VectorOperators.REINTERPRET_D2L
Reinterpret bits ofdoubleVal
aslong
.static finalVectorOperators.Conversion
<Long, Double> VectorOperators.REINTERPRET_L2D
Reinterpret bits oflongVal
asdouble
.static finalVectorOperators.Conversion
<Short, Long> VectorOperators.S2L
ConvertshortVal
to(long)shortVal
.static finalVectorSpecies
<Long> LongVector.SPECIES_128
Species representingLongVector
s ofVectorShape.S_128_BIT
.static finalVectorSpecies
<Long> LongVector.SPECIES_256
Species representingLongVector
s ofVectorShape.S_256_BIT
.static finalVectorSpecies
<Long> LongVector.SPECIES_512
Species representingLongVector
s ofVectorShape.S_512_BIT
.static finalVectorSpecies
<Long> LongVector.SPECIES_64
Species representingLongVector
s ofVectorShape.S_64_BIT
.static finalVectorSpecies
<Long> LongVector.SPECIES_MAX
Species representingLongVector
s ofVectorShape.S_Max_BIT
.static finalVectorSpecies
<Long> LongVector.SPECIES_PREFERRED
Preferred species forLongVector
s.static finalVectorOperators.Conversion
<Byte, Long> VectorOperators.ZERO_EXTEND_B2L
Zero-extendbyteVal
tolong
.static finalVectorOperators.Conversion
<Integer, Long> VectorOperators.ZERO_EXTEND_I2L
Zero-extendintVal
tolong
.static finalVectorOperators.Conversion
<Short, Long> VectorOperators.ZERO_EXTEND_S2L
Zero-extendshortVal
tolong
.Methods injdk.incubator.vector that return types with arguments of typeLongModifier and TypeMethodDescriptionabstractVectorMask
<Long> LongVector.compare
(VectorOperators.Comparison op, long e) Tests this vector by comparing it with an input scalar, according to the given comparison operation.finalVectorMask
<Long> LongVector.compare
(VectorOperators.Comparison op, long e,VectorMask<Long> m) Tests this vector by comparing it with an input scalar, according to the given comparison operation, in lanes selected by a mask.abstractVectorMask
<Long> LongVector.compare
(VectorOperators.Comparison op,Vector<Long> v) Tests this vector by comparing it with another input vector, according to the given comparison operation.finalVectorMask
<Long> LongVector.eq
(long e) Tests if this vector is equal to an input scalar.finalVectorMask
<Long> Tests if this vector is equal to another input vector.finalVectorMask
<Long> LongVector.lt
(long e) Tests if this vector is less than an input scalar.finalVectorMask
<Long> Tests if this vector is less than another input vector.abstractVectorMask
<Long> LongVector.test
(VectorOperators.Test op) Tests the lanes of this vector according to the given operation.abstractVectorMask
<Long> LongVector.test
(VectorOperators.Test op,VectorMask<Long> m) Test selected lanes of this vector, according to the given operation.Method parameters injdk.incubator.vector with type arguments of typeLongModifier and TypeMethodDescriptionfinalLongVector
LongVector.add
(long e,VectorMask<Long> m) Adds this vector to the broadcast of an input scalar, selecting lane elements controlled by a mask.finalLongVector
Adds this vector to a second input vector.finalLongVector
LongVector.add
(Vector<Long> v,VectorMask<Long> m) Adds this vector to a second input vector, selecting lanes under the control of a mask.finalLongVector
LongVector.add
(Vector<Long> v,VectorMask<Long> m) Adds this vector to a second input vector, selecting lanes under the control of a mask.finalLongVector
Computes the bitwise logical conjunction (&
) of this vector and a second input vector.finalLongVector
LongVector.bitwiseBlend
(long bits,Vector<Long> mask) Blends together the bits of a vector and a scalar under the control of another vector, which supplies mask bits.finalLongVector
LongVector.bitwiseBlend
(Vector<Long> bits, long mask) Blends together the bits of two vectors under the control of a scalar, which supplies mask bits.finalLongVector
LongVector.bitwiseBlend
(Vector<Long> bits,Vector<Long> mask) Blends together the bits of two vectors under the control of a third, which supplies mask bits.finalLongVector
LongVector.blend
(long e,VectorMask<Long> m) Replaces selected lanes of this vector with a scalar value under the control of a mask.abstractLongVector
LongVector.blend
(Vector<Long> v,VectorMask<Long> m) Replaces selected lanes of this vector with corresponding lanes from a second input vector under the control of a mask.abstractLongVector
LongVector.blend
(Vector<Long> v,VectorMask<Long> m) Replaces selected lanes of this vector with corresponding lanes from a second input vector under the control of a mask.staticLongVector
LongVector.broadcast
(VectorSpecies<Long> species, long e) Returns a vector of the given species where all lane elements are set to the primitive valuee
.finalVectorMask
<Long> LongVector.compare
(VectorOperators.Comparison op, long e,VectorMask<Long> m) Tests this vector by comparing it with an input scalar, according to the given comparison operation, in lanes selected by a mask.abstractVectorMask
<Long> LongVector.compare
(VectorOperators.Comparison op,Vector<Long> v) Tests this vector by comparing it with another input vector, according to the given comparison operation.abstractLongVector
LongVector.compress
(VectorMask<Long> m) Compresses the lane elements of this vector selecting lanes under the control of a specific mask.finalLongVector
LongVector.div
(long e,VectorMask<Long> m) Divides this vector by the broadcast of an input scalar, selecting lane elements controlled by a mask.finalLongVector
Divides this vector by a second input vector.finalLongVector
LongVector.div
(Vector<Long> v,VectorMask<Long> m) Divides this vector by a second input vector under the control of a mask.finalLongVector
LongVector.div
(Vector<Long> v,VectorMask<Long> m) Divides this vector by a second input vector under the control of a mask.finalVectorMask
<Long> Tests if this vector is equal to another input vector.abstractLongVector
LongVector.expand
(VectorMask<Long> m) Expands the lane elements of this vector under the control of a specific mask.staticLongVector
LongVector.fromArray
(VectorSpecies<Long> species, long[] a, int offset) Loads a vector from an array of typelong[]
starting at an offset.staticLongVector
LongVector.fromArray
(VectorSpecies<Long> species, long[] a, int offset, int[] indexMap, int mapOffset) Gathers a new vector composed of elements from an array of typelong[]
, using indexes obtained by adding a fixedoffset
to a series of secondary offsets from anindex map.staticLongVector
LongVector.fromArray
(VectorSpecies<Long> species, long[] a, int offset, int[] indexMap, int mapOffset,VectorMask<Long> m) Gathers a new vector composed of elements from an array of typelong[]
, under the control of a mask, and using indexes obtained by adding a fixedoffset
to a series of secondary offsets from anindex map.staticLongVector
LongVector.fromArray
(VectorSpecies<Long> species, long[] a, int offset, int[] indexMap, int mapOffset,VectorMask<Long> m) Gathers a new vector composed of elements from an array of typelong[]
, under the control of a mask, and using indexes obtained by adding a fixedoffset
to a series of secondary offsets from anindex map.staticLongVector
LongVector.fromArray
(VectorSpecies<Long> species, long[] a, int offset,VectorMask<Long> m) Loads a vector from an array of typelong[]
starting at an offset and using a mask.staticLongVector
LongVector.fromArray
(VectorSpecies<Long> species, long[] a, int offset,VectorMask<Long> m) Loads a vector from an array of typelong[]
starting at an offset and using a mask.staticLongVector
LongVector.fromMemorySegment
(VectorSpecies<Long> species,MemorySegment ms, long offset,ByteOrder bo) Loads a vector from amemory segment starting at an offset into the memory segment.staticLongVector
LongVector.fromMemorySegment
(VectorSpecies<Long> species,MemorySegment ms, long offset,ByteOrder bo,VectorMask<Long> m) Loads a vector from amemory segment starting at an offset into the memory segment and using a mask.staticLongVector
LongVector.fromMemorySegment
(VectorSpecies<Long> species,MemorySegment ms, long offset,ByteOrder bo,VectorMask<Long> m) Loads a vector from amemory segment starting at an offset into the memory segment and using a mask.final void
LongVector.intoArray
(long[] a, int offset, int[] indexMap, int mapOffset,VectorMask<Long> m) Scatters this vector into an array of typelong[]
, under the control of a mask, and using indexes obtained by adding a fixedoffset
to a series of secondary offsets from anindex map.final void
LongVector.intoArray
(long[] a, int offset,VectorMask<Long> m) Stores this vector into an array of typelong[]
starting at offset and using a mask.final void
LongVector.intoMemorySegment
(MemorySegment ms, long offset,ByteOrder bo,VectorMask<Long> m) Stores this vector into amemory segment starting at an offset using explicit byte order and a mask.finalLongVector
LongVector.lanewise
(VectorOperators.Binary op, long e,VectorMask<Long> m) Combines the lane values of this vector with the value of a broadcast scalar, with selection of lane elements controlled by a mask.abstractLongVector
LongVector.lanewise
(VectorOperators.Binary op,Vector<Long> v) Combines the corresponding lane values of this vector with those of a second input vector.abstractLongVector
LongVector.lanewise
(VectorOperators.Binary op,Vector<Long> v,VectorMask<Long> m) Combines the corresponding lane values of this vector with those of a second input vector, with selection of lane elements controlled by a mask.abstractLongVector
LongVector.lanewise
(VectorOperators.Binary op,Vector<Long> v,VectorMask<Long> m) Combines the corresponding lane values of this vector with those of a second input vector, with selection of lane elements controlled by a mask.finalLongVector
LongVector.lanewise
(VectorOperators.Ternary op, long e1, long e2,VectorMask<Long> m) Combines the lane values of this vector with the values of two broadcast scalars, with selection of lane elements controlled by a mask.finalLongVector
LongVector.lanewise
(VectorOperators.Ternary op, long e1,Vector<Long> v2) Combines the lane values of this vector with the values of another vector and a broadcast scalar.finalLongVector
LongVector.lanewise
(VectorOperators.Ternary op, long e1,Vector<Long> v2,VectorMask<Long> m) Combines the lane values of this vector with the values of another vector and a broadcast scalar, with selection of lane elements controlled by a mask.finalLongVector
LongVector.lanewise
(VectorOperators.Ternary op, long e1,Vector<Long> v2,VectorMask<Long> m) Combines the lane values of this vector with the values of another vector and a broadcast scalar, with selection of lane elements controlled by a mask.finalLongVector
LongVector.lanewise
(VectorOperators.Ternary op,Vector<Long> v1, long e2) Combines the lane values of this vector with the values of another vector and a broadcast scalar.finalLongVector
LongVector.lanewise
(VectorOperators.Ternary op,Vector<Long> v1, long e2,VectorMask<Long> m) Combines the lane values of this vector with the values of another vector and a broadcast scalar, with selection of lane elements controlled by a mask.finalLongVector
LongVector.lanewise
(VectorOperators.Ternary op,Vector<Long> v1, long e2,VectorMask<Long> m) Combines the lane values of this vector with the values of another vector and a broadcast scalar, with selection of lane elements controlled by a mask.abstractLongVector
Combines the corresponding lane values of this vector with the lanes of a second and a third input vector.abstractLongVector
LongVector.lanewise
(VectorOperators.Ternary op,Vector<Long> v1,Vector<Long> v2,VectorMask<Long> m) Combines the corresponding lane values of this vector with the lanes of a second and a third input vector, with selection of lane elements controlled by a mask.abstractLongVector
LongVector.lanewise
(VectorOperators.Ternary op,Vector<Long> v1,Vector<Long> v2,VectorMask<Long> m) Combines the corresponding lane values of this vector with the lanes of a second and a third input vector, with selection of lane elements controlled by a mask.abstractLongVector
LongVector.lanewise
(VectorOperators.Unary op,VectorMask<Long> m) Operates on the lane values of this vector, with selection of lane elements controlled by a mask.finalVectorMask
<Long> Tests if this vector is less than another input vector.finalLongVector
Computes the larger of this vector and a second input vector.finalLongVector
Computes the smaller of this vector and a second input vector.finalLongVector
LongVector.mul
(long e,VectorMask<Long> m) Multiplies this vector by the broadcast of an input scalar, selecting lane elements controlled by a mask.finalLongVector
Multiplies this vector by a second input vector.finalLongVector
LongVector.mul
(Vector<Long> v,VectorMask<Long> m) Multiplies this vector by a second input vector under the control of a mask.finalLongVector
LongVector.mul
(Vector<Long> v,VectorMask<Long> m) Multiplies this vector by a second input vector under the control of a mask.finalLongVector
Computes the bitwise logical disjunction (|
) of this vector and a second input vector.abstractLongVector
LongVector.rearrange
(VectorShuffle<Long> shuffle) Rearranges the lane elements of this vector, selecting lanes under the control of a specific shuffle.abstractLongVector
LongVector.rearrange
(VectorShuffle<Long> s,Vector<Long> v) Rearranges the lane elements of two vectors, selecting lanes under the control of a specific shuffle, using both normal and exceptional indexes in the shuffle to steer data.abstractLongVector
LongVector.rearrange
(VectorShuffle<Long> s,Vector<Long> v) Rearranges the lane elements of two vectors, selecting lanes under the control of a specific shuffle, using both normal and exceptional indexes in the shuffle to steer data.abstractLongVector
LongVector.rearrange
(VectorShuffle<Long> s,VectorMask<Long> m) Rearranges the lane elements of this vector, selecting lanes under the control of a specific shuffle and a mask.abstractLongVector
LongVector.rearrange
(VectorShuffle<Long> s,VectorMask<Long> m) Rearranges the lane elements of this vector, selecting lanes under the control of a specific shuffle and a mask.abstract long
LongVector.reduceLanes
(VectorOperators.Associative op,VectorMask<Long> m) Returns a value accumulated from selected lanes of this vector, controlled by a mask.abstractLongVector
LongVector.selectFrom
(Vector<Long> v) Using index values stored in the lanes of this vector, assemble values stored in second vectorv
.abstractLongVector
LongVector.selectFrom
(Vector<Long> v1,Vector<Long> v2) Using values stored in the lanes of this vector, assemble values stored in the second vectorv1
and third vectorv2
.abstractLongVector
LongVector.selectFrom
(Vector<Long> s,VectorMask<Long> m) Using index values stored in the lanes of this vector, assemble values stored in second vector, under the control of a mask.abstractLongVector
LongVector.selectFrom
(Vector<Long> s,VectorMask<Long> m) Using index values stored in the lanes of this vector, assemble values stored in second vector, under the control of a mask.abstractLongVector
Slices a segment of adjacent lanes, starting at a givenorigin
lane in the current vector, and continuing (as needed) into an immediately following vector.finalLongVector
LongVector.slice
(int origin,Vector<Long> w,VectorMask<Long> m) Slices a segment of adjacent lanes under the control of a mask, starting at a givenorigin
lane in the current vector, and continuing (as needed) into an immediately following vector.finalLongVector
LongVector.slice
(int origin,Vector<Long> w,VectorMask<Long> m) Slices a segment of adjacent lanes under the control of a mask, starting at a givenorigin
lane in the current vector, and continuing (as needed) into an immediately following vector.finalLongVector
LongVector.sub
(long e,VectorMask<Long> m) Subtracts an input scalar from this vector under the control of a mask.finalLongVector
Subtracts a second input vector from this vector.finalLongVector
LongVector.sub
(Vector<Long> v,VectorMask<Long> m) Subtracts a second input vector from this vector under the control of a mask.finalLongVector
LongVector.sub
(Vector<Long> v,VectorMask<Long> m) Subtracts a second input vector from this vector under the control of a mask.abstractVectorMask
<Long> LongVector.test
(VectorOperators.Test op,VectorMask<Long> m) Test selected lanes of this vector, according to the given operation.abstractLongVector
Reverses aslice(), inserting the current vector as a slice within another "background" input vector, which is regarded as one or the other input to a hypothetical subsequentslice()
operation.abstractLongVector
LongVector.unslice
(int origin,Vector<Long> w, int part,VectorMask<Long> m) Reverses aslice(), inserting (under the control of a mask) the current vector as a slice within another "background" input vector, which is regarded as one or the other input to a hypothetical subsequentslice()
operation.abstractLongVector
LongVector.unslice
(int origin,Vector<Long> w, int part,VectorMask<Long> m) Reverses aslice(), inserting (under the control of a mask) the current vector as a slice within another "background" input vector, which is regarded as one or the other input to a hypothetical subsequentslice()
operation.staticLongVector
LongVector.zero
(VectorSpecies<Long> species) Returns a vector of the given species where all lane elements are set to zero, the default primitive value.