Uses of Class
java.lang.Long
Package
Description
Provides classes that are fundamental to the design of the Java
programming language.
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 of Long in java.lang
Modifier and TypeFieldDescriptionLong.TYPE
TheClass
instance representing the primitive typelong
.Modifier and TypeMethodDescriptionstatic Long
Decodes aString
into aLong
.static Long
Determines thelong
value of the system property with the specified name.static Long
Determines thelong
value of the system property with the specified name.static Long
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.static Long
Long.valueOf(long l)
Returns aLong
instance representing the specifiedlong
value.static Long
Returns aLong
object holding the value of the specifiedString
.static Long
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 of Long in java.nio.channels
Modifier 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 of Long in java.time.chrono
Modifier 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 of Long in java.time.format
Modifier 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 of Long in java.time.temporal
Modifier and TypeMethodDescriptiondefault TemporalAccessor
TemporalField.resolve(Map<TemporalField,Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle)
Resolves this field to provide a simpler alternative or a date. -
Uses of Long in java.util
Modifier and TypeMethodDescriptiondefault Long
PrimitiveIterator.OfLong.next()
Returns the next element in the iteration.Modifier and TypeMethodDescriptiondefault void
PrimitiveIterator.OfLong.forEachRemaining(Consumer<? super Long> 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<? super Long> 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<? super Long> action)
If a remaining element exists, performs the given action on it, returningtrue
; else returnsfalse
. -
Uses of Long in java.util.stream
Modifier 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 of Long in javax.management.openmbean
Modifier and TypeFieldDescriptionstatic SimpleType<Long>
SimpleType.LONG
TheSimpleType
instance describing values whose Java class name isjava.lang.Long
. -
Uses of Long in javax.management.timer
Modifier 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 of Long in jdk.incubator.vector
Modifier and TypeFieldDescriptionstatic VectorOperators.Conversion<Byte,Long>
VectorOperators.B2L
ConvertbyteVal
to(long)byteVal
.static VectorOperators.Conversion<Double,Long>
VectorOperators.D2L
ConvertdoubleVal
to(long)doubleVal
.static VectorOperators.Conversion<Float,Long>
VectorOperators.F2L
ConvertfloatVal
to(long)floatVal
.static VectorOperators.Conversion<Integer,Long>
VectorOperators.I2L
ConvertintVal
to(long)intVal
.static VectorOperators.Conversion<Long,Byte>
VectorOperators.L2B
ConvertlongVal
to(byte)longVal
.static VectorOperators.Conversion<Long,Double>
VectorOperators.L2D
ConvertlongVal
to(double)longVal
.static VectorOperators.Conversion<Long,Float>
VectorOperators.L2F
ConvertlongVal
to(float)longVal
.static VectorOperators.Conversion<Long,Integer>
VectorOperators.L2I
ConvertlongVal
to(int)longVal
.static VectorOperators.Conversion<Long,Short>
VectorOperators.L2S
ConvertlongVal
to(short)longVal
.static VectorOperators.Conversion<Double,Long>
VectorOperators.REINTERPRET_D2L
Reinterpret bits ofdoubleVal
aslong
.static VectorOperators.Conversion<Long,Double>
VectorOperators.REINTERPRET_L2D
Reinterpret bits oflongVal
asdouble
.static VectorOperators.Conversion<Short,Long>
VectorOperators.S2L
ConvertshortVal
to(long)shortVal
.static VectorSpecies<Long>
LongVector.SPECIES_128
Species representingLongVector
s ofVectorShape.S_128_BIT
.static VectorSpecies<Long>
LongVector.SPECIES_256
Species representingLongVector
s ofVectorShape.S_256_BIT
.static VectorSpecies<Long>
LongVector.SPECIES_512
Species representingLongVector
s ofVectorShape.S_512_BIT
.static VectorSpecies<Long>
LongVector.SPECIES_64
Species representingLongVector
s ofVectorShape.S_64_BIT
.static VectorSpecies<Long>
LongVector.SPECIES_MAX
Species representingLongVector
s ofVectorShape.S_Max_BIT
.static VectorSpecies<Long>
LongVector.SPECIES_PREFERRED
Preferred species forLongVector
s.static VectorOperators.Conversion<Byte,Long>
VectorOperators.ZERO_EXTEND_B2L
Zero-extendbyteVal
tolong
.static VectorOperators.Conversion<Integer,Long>
VectorOperators.ZERO_EXTEND_I2L
Zero-extendintVal
tolong
.static VectorOperators.Conversion<Short,Long>
VectorOperators.ZERO_EXTEND_S2L
Zero-extendshortVal
tolong
.Modifier and TypeMethodDescriptionabstract VectorMask<Long>
LongVector.compare(VectorOperators.Comparison op, long e)
Tests this vector by comparing it with an input scalar, according to the given comparison operation.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.abstract VectorMask<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.LongVector.compare(VectorOperators.Comparison op, Vector<Long> v, VectorMask<Long> m)
Tests this vector by comparing it with another input vector, according to the given comparison operation, in lanes selected by a mask.LongVector.eq(long e)
Tests if this vector is equal to an input scalar.Tests if this vector is equal to another input vector.LongVector.lt(long e)
Tests if this vector is less than an input scalar.Tests if this vector is less than another input vector.abstract VectorMask<Long>
LongVector.test(VectorOperators.Test op)
Tests the lanes of this vector according to the given operation.LongVector.test(VectorOperators.Test op, VectorMask<Long> m)
Test selected lanes of this vector, according to the given operation.Modifier and TypeMethodDescriptionLongVector.add(long e, VectorMask<Long> m)
Adds this vector to the broadcast of an input scalar, selecting lane elements controlled by a mask.Adds this vector to a second input vector.LongVector.add(Vector<Long> v, VectorMask<Long> m)
Adds this vector to a second input vector, selecting lanes under the control of a mask.LongVector.add(Vector<Long> v, VectorMask<Long> m)
Adds this vector to a second input vector, selecting lanes under the control of a mask.Computes the bitwise logical conjunction (&
) of this vector and a second input vector.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.LongVector.bitwiseBlend(Vector<Long> bits, long mask)
Blends together the bits of two vectors under the control of a scalar, which supplies mask bits.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.LongVector.blend(long e, VectorMask<Long> m)
Replaces selected lanes of this vector with a scalar value under the control of a mask.abstract LongVector
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.abstract LongVector
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.static LongVector
LongVector.broadcast(VectorSpecies<Long> species, long e)
Returns a vector of the given species where all lane elements are set to the primitive valuee
.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.abstract VectorMask<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.LongVector.compare(VectorOperators.Comparison op, Vector<Long> v, VectorMask<Long> m)
Tests this vector by comparing it with another input vector, according to the given comparison operation, in lanes selected by a mask.LongVector.compare(VectorOperators.Comparison op, Vector<Long> v, VectorMask<Long> m)
Tests this vector by comparing it with another input vector, according to the given comparison operation, in lanes selected by a mask.LongVector.div(long e, VectorMask<Long> m)
Divides this vector by the broadcast of an input scalar, selecting lane elements controlled by a mask.Divides this vector by a second input vector.LongVector.div(Vector<Long> v, VectorMask<Long> m)
Divides this vector by a second input vector under the control of a mask.LongVector.div(Vector<Long> v, VectorMask<Long> m)
Divides this vector by a second input vector under the control of a mask.Tests if this vector is equal to another input vector.static LongVector
LongVector.fromArray(VectorSpecies<Long> species, long[] a, int offset)
Loads a vector from an array of typelong[]
starting at an offset.static LongVector
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 an index map.static LongVector
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 an index map.static LongVector
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 an index map.static LongVector
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.static LongVector
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.static LongVector
LongVector.fromByteArray(VectorSpecies<Long> species, byte[] a, int offset, ByteOrder bo)
Loads a vector from a byte array starting at an offset.static LongVector
LongVector.fromByteArray(VectorSpecies<Long> species, byte[] a, int offset, ByteOrder bo, VectorMask<Long> m)
Loads a vector from a byte array starting at an offset and using a mask.static LongVector
LongVector.fromByteArray(VectorSpecies<Long> species, byte[] a, int offset, ByteOrder bo, VectorMask<Long> m)
Loads a vector from a byte array starting at an offset and using a mask.static LongVector
LongVector.fromByteBuffer(VectorSpecies<Long> species, ByteBuffer bb, int offset, ByteOrder bo)
Loads a vector from a byte buffer starting at an offset into the byte buffer.static LongVector
LongVector.fromByteBuffer(VectorSpecies<Long> species, ByteBuffer bb, int offset, ByteOrder bo, VectorMask<Long> m)
Loads a vector from a byte buffer starting at an offset into the byte buffer and using a mask.static LongVector
LongVector.fromByteBuffer(VectorSpecies<Long> species, ByteBuffer bb, int offset, ByteOrder bo, VectorMask<Long> m)
Loads a vector from a byte buffer starting at an offset into the byte buffer and using a mask.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 an index map.void
LongVector.intoArray(long[] a, int offset, VectorMask<Long> m)
Stores this vector into an array oflong
starting at offset and using a mask.void
LongVector.intoByteArray(byte[] a, int offset, ByteOrder bo, VectorMask<Long> m)
Stores this vector into a byte array starting at an offset using explicit byte order and a mask.void
LongVector.intoByteBuffer(ByteBuffer bb, int offset, ByteOrder bo, VectorMask<Long> m)
Stores this vector into a byte buffer starting at an offset using explicit byte order and a mask.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.abstract LongVector
LongVector.lanewise(VectorOperators.Binary op, Vector<Long> v)
Combines the corresponding lane values of this vector with those of a second input vector.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.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.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.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.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.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.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.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.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.abstract LongVector
Combines the corresponding lane values of this vector with the lanes of a second and a third input vector.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.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.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.Tests if this vector is less than another input vector.Computes the larger of this vector and a second input vector.Computes the smaller of this vector and a second input vector.LongVector.mul(long e, VectorMask<Long> m)
Multiplies this vector by the broadcast of an input scalar, selecting lane elements controlled by a mask.Multiplies this vector by a second input vector.LongVector.mul(Vector<Long> v, VectorMask<Long> m)
Multiplies this vector by a second input vector under the control of a mask.LongVector.mul(Vector<Long> v, VectorMask<Long> m)
Multiplies this vector by a second input vector under the control of a mask.Computes the bitwise logical disjunction (|
) of this vector and a second input vector.abstract LongVector
LongVector.rearrange(VectorShuffle<Long> m)
Rearranges the lane elements of this vector, selecting lanes under the control of a specific shuffle.abstract LongVector
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.abstract LongVector
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.abstract LongVector
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 LongVector
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.abstract LongVector
LongVector.selectFrom(Vector<Long> v)
Using index values stored in the lanes of this vector, assemble values stored in second vectorv
.abstract LongVector
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.abstract LongVector
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.abstract LongVector
Slices a segment of adjacent lanes, starting at a givenorigin
lane in the current vector, and continuing (as needed) into an immediately following vector.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.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.LongVector.sub(long e, VectorMask<Long> m)
Subtracts an input scalar from this vector under the control of a mask.Subtracts a second input vector from this vector.LongVector.sub(Vector<Long> v, VectorMask<Long> m)
Subtracts a second input vector from this vector under the control of a mask.LongVector.sub(Vector<Long> v, VectorMask<Long> m)
Subtracts a second input vector from this vector under the control of a mask.LongVector.test(VectorOperators.Test op, VectorMask<Long> m)
Test selected lanes of this vector, according to the given operation.abstract LongVector
Reverses a slice(), 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.abstract LongVector
LongVector.unslice(int origin, Vector<Long> w, int part, VectorMask<Long> m)
Reverses a slice(), 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.abstract LongVector
LongVector.unslice(int origin, Vector<Long> w, int part, VectorMask<Long> m)
Reverses a slice(), 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.static LongVector
LongVector.zero(VectorSpecies<Long> species)
Returns a vector of the given species where all lane elements are set to zero, the default primitive value.