Uses of Class
java.lang.Long
Packages that use 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.TYPETheClassinstance representing the primitive typelong.Modifier and TypeMethodDescriptionstatic LongDecodes aStringinto aLong.static LongDetermines thelongvalue of the system property with the specified name.static LongDetermines thelongvalue of the system property with the specified name.static LongReturns thelongvalue 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 LongLong.valueOf(long l) Returns aLonginstance representing the specifiedlongvalue.static LongReturns aLongobject holding the value of the specifiedString.static LongReturns aLongobject holding the value extracted from the specifiedStringwhen parsed with the radix given by the second argument.Modifier and TypeMethodDescriptionLong.describeConstable()Returns anOptionalcontaining the nominal descriptor for this instance, which is the instance itself. -
Uses of Long in java.nio.channels
Method parameters in java.nio.channels with type arguments of type LongModifier and TypeMethodDescriptionabstract <A> voidAsynchronousSocketChannel.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> voidAsynchronousSocketChannel.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
Method parameters in java.time.chrono with type arguments of type LongModifier and TypeMethodDescriptionAbstractChronology.resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) Resolves parsedChronoFieldvalues into a date during parsing.Chronology.resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) Resolves parsedChronoFieldvalues into a date during parsing.HijrahChronology.resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) IsoChronology.resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) Resolves parsedChronoFieldvalues 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
Method parameters in java.time.format with type arguments of type LongModifier 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
Method parameters in java.time.temporal with type arguments of type LongModifier and TypeMethodDescriptiondefault TemporalAccessorTemporalField.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 LongPrimitiveIterator.OfLong.next()Returns the next element in the iteration.Modifier and TypeMethodDescriptiondefault voidPrimitiveIterator.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 voidSpliterator.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 booleanSpliterator.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
Methods in java.util.stream that return types with arguments of type LongModifier and TypeMethodDescriptionLongStream.boxed()Returns aStreamconsisting of the elements of this stream, each boxed to aLong.Collectors.counting()Returns aCollectoraccepting elements of typeTthat counts the number of input elements.Collectors.summingLong(ToLongFunction<? super T> mapper) Returns aCollectorthat produces the sum of a long-valued function applied to the input elements. -
Uses of Long in javax.management.openmbean
Fields in javax.management.openmbean with type parameters of type LongModifier and TypeFieldDescriptionstatic final SimpleType<Long>SimpleType.LONGTheSimpleTypeinstance describing values whose Java class name isjava.lang.Long. -
Uses of Long in javax.management.timer
Methods in javax.management.timer that return LongModifier 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
Fields in jdk.incubator.vector with type parameters of type LongModifier and TypeFieldDescriptionstatic final VectorOperators.Conversion<Byte,Long> VectorOperators.B2LConvertbyteValto(long)byteVal.static final VectorOperators.Conversion<Double,Long> VectorOperators.D2LConvertdoubleValto(long)doubleVal.static final VectorOperators.Conversion<Float,Long> VectorOperators.F2LConvertfloatValto(long)floatVal.static final VectorOperators.Conversion<Integer,Long> VectorOperators.I2LConvertintValto(long)intVal.static final VectorOperators.Conversion<Long,Byte> VectorOperators.L2BConvertlongValto(byte)longVal.static final VectorOperators.Conversion<Long,Double> VectorOperators.L2DConvertlongValto(double)longVal.static final VectorOperators.Conversion<Long,Float> VectorOperators.L2FConvertlongValto(float)longVal.static final VectorOperators.Conversion<Long,Integer> VectorOperators.L2IConvertlongValto(int)longVal.static final VectorOperators.Conversion<Long,Short> VectorOperators.L2SConvertlongValto(short)longVal.static final VectorOperators.Conversion<Double,Long> VectorOperators.REINTERPRET_D2LReinterpret bits ofdoubleValaslong.static final VectorOperators.Conversion<Long,Double> VectorOperators.REINTERPRET_L2DReinterpret bits oflongValasdouble.static final VectorOperators.Conversion<Short,Long> VectorOperators.S2LConvertshortValto(long)shortVal.static final VectorSpecies<Long>LongVector.SPECIES_128Species representingLongVectors ofVectorShape.S_128_BIT.static final VectorSpecies<Long>LongVector.SPECIES_256Species representingLongVectors ofVectorShape.S_256_BIT.static final VectorSpecies<Long>LongVector.SPECIES_512Species representingLongVectors ofVectorShape.S_512_BIT.static final VectorSpecies<Long>LongVector.SPECIES_64Species representingLongVectors ofVectorShape.S_64_BIT.static final VectorSpecies<Long>LongVector.SPECIES_MAXSpecies representingLongVectors ofVectorShape.S_Max_BIT.static final VectorSpecies<Long>LongVector.SPECIES_PREFERREDPreferred species forLongVectors.static final VectorOperators.Conversion<Byte,Long> VectorOperators.ZERO_EXTEND_B2LZero-extendbyteValtolong.static final VectorOperators.Conversion<Integer,Long> VectorOperators.ZERO_EXTEND_I2LZero-extendintValtolong.static final VectorOperators.Conversion<Short,Long> VectorOperators.ZERO_EXTEND_S2LZero-extendshortValtolong.Methods in jdk.incubator.vector that return types with arguments of type LongModifier 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.final VectorMask<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.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.final VectorMask<Long>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.final VectorMask<Long>LongVector.eq(long e) Tests if this vector is equal to an input scalar.final VectorMask<Long>Tests if this vector is equal to another input vector.final VectorMask<Long>LongVector.lt(long e) Tests if this vector is less than an input scalar.final VectorMask<Long>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.final VectorMask<Long>LongVector.test(VectorOperators.Test op, VectorMask<Long> m) Test selected lanes of this vector, according to the given operation.Method parameters in jdk.incubator.vector with type arguments of type LongModifier and TypeMethodDescriptionfinal LongVectorLongVector.add(long e, VectorMask<Long> m) Adds this vector to the broadcast of an input scalar, selecting lane elements controlled by a mask.final LongVectorAdds this vector to a second input vector.final LongVectorLongVector.add(Vector<Long> v, VectorMask<Long> m) Adds this vector to a second input vector, selecting lanes under the control of a mask.final LongVectorLongVector.add(Vector<Long> v, VectorMask<Long> m) Adds this vector to a second input vector, selecting lanes under the control of a mask.final LongVectorComputes the bitwise logical conjunction (&) of this vector and a second input vector.final LongVectorLongVector.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.final LongVectorLongVector.bitwiseBlend(Vector<Long> bits, long mask) Blends together the bits of two vectors under the control of a scalar, which supplies mask bits.final LongVectorLongVector.bitwiseBlend(Vector<Long> bits, Vector<Long> mask) Blends together the bits of two vectors under the control of a third, which supplies mask bits.final LongVectorLongVector.blend(long e, VectorMask<Long> m) Replaces selected lanes of this vector with a scalar value under the control of a mask.abstract LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.broadcast(VectorSpecies<Long> species, long e) Returns a vector of the given species where all lane elements are set to the primitive valuee.final VectorMask<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.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.final VectorMask<Long>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.final VectorMask<Long>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.final LongVectorLongVector.div(long e, VectorMask<Long> m) Divides this vector by the broadcast of an input scalar, selecting lane elements controlled by a mask.final LongVectorDivides this vector by a second input vector.final LongVectorLongVector.div(Vector<Long> v, VectorMask<Long> m) Divides this vector by a second input vector under the control of a mask.final LongVectorLongVector.div(Vector<Long> v, VectorMask<Long> m) Divides this vector by a second input vector under the control of a mask.final VectorMask<Long>Tests if this vector is equal to another input vector.static LongVectorLongVector.fromArray(VectorSpecies<Long> species, long[] a, int offset) Loads a vector from an array of typelong[]starting at an offset.static LongVectorLongVector.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 fixedoffsetto a series of secondary offsets from an index map.static LongVectorLongVector.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 fixedoffsetto a series of secondary offsets from an index map.static LongVectorLongVector.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 fixedoffsetto a series of secondary offsets from an index map.static LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.fromByteArray(VectorSpecies<Long> species, byte[] a, int offset, ByteOrder bo) Loads a vector from a byte array starting at an offset.static LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.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.final voidLongVector.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 fixedoffsetto a series of secondary offsets from an index map.final voidLongVector.intoArray(long[] a, int offset, VectorMask<Long> m) Stores this vector into an array of typelong[]starting at offset and using a mask.final voidLongVector.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.final voidLongVector.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.final LongVectorLongVector.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 LongVectorLongVector.lanewise(VectorOperators.Binary op, Vector<Long> v) Combines the corresponding lane values of this vector with those of a second input vector.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.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 LongVectorCombines the corresponding lane values of this vector with the lanes of a second and a third input vector.final LongVectorLongVector.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.final LongVectorLongVector.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.final LongVectorLongVector.lanewise(VectorOperators.Unary op, VectorMask<Long> m) Operates on the lane values of this vector, with selection of lane elements controlled by a mask.final VectorMask<Long>Tests if this vector is less than another input vector.final LongVectorComputes the larger of this vector and a second input vector.final LongVectorComputes the smaller of this vector and a second input vector.final LongVectorLongVector.mul(long e, VectorMask<Long> m) Multiplies this vector by the broadcast of an input scalar, selecting lane elements controlled by a mask.final LongVectorMultiplies this vector by a second input vector.final LongVectorLongVector.mul(Vector<Long> v, VectorMask<Long> m) Multiplies this vector by a second input vector under the control of a mask.final LongVectorLongVector.mul(Vector<Long> v, VectorMask<Long> m) Multiplies this vector by a second input vector under the control of a mask.final LongVectorComputes the bitwise logical disjunction (|) of this vector and a second input vector.abstract LongVectorLongVector.rearrange(VectorShuffle<Long> m) Rearranges the lane elements of this vector, selecting lanes under the control of a specific shuffle.abstract LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.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 longLongVector.reduceLanes(VectorOperators.Associative op, VectorMask<Long> m) Returns a value accumulated from selected lanes of this vector, controlled by a mask.abstract LongVectorLongVector.selectFrom(Vector<Long> v) Using index values stored in the lanes of this vector, assemble values stored in second vectorv.abstract LongVectorLongVector.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 LongVectorLongVector.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 LongVectorSlices a segment of adjacent lanes, starting at a givenoriginlane in the current vector, and continuing (as needed) into an immediately following vector.final LongVectorLongVector.slice(int origin, Vector<Long> w, VectorMask<Long> m) Slices a segment of adjacent lanes under the control of a mask, starting at a givenoriginlane in the current vector, and continuing (as needed) into an immediately following vector.final LongVectorLongVector.slice(int origin, Vector<Long> w, VectorMask<Long> m) Slices a segment of adjacent lanes under the control of a mask, starting at a givenoriginlane in the current vector, and continuing (as needed) into an immediately following vector.final LongVectorLongVector.sub(long e, VectorMask<Long> m) Subtracts an input scalar from this vector under the control of a mask.final LongVectorSubtracts a second input vector from this vector.final LongVectorLongVector.sub(Vector<Long> v, VectorMask<Long> m) Subtracts a second input vector from this vector under the control of a mask.final LongVectorLongVector.sub(Vector<Long> v, VectorMask<Long> m) Subtracts a second input vector from this vector under the control of a mask.final VectorMask<Long>LongVector.test(VectorOperators.Test op, VectorMask<Long> m) Test selected lanes of this vector, according to the given operation.abstract LongVectorReverses 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 LongVectorLongVector.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 LongVectorLongVector.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 LongVectorLongVector.zero(VectorSpecies<Long> species) Returns a vector of the given species where all lane elements are set to zero, the default primitive value.