Uses of Class
java.lang.Long
Packages that useLong Package Description java.lang Provides classes that are fundamental to the design of the Java programming language.java.nio.channels 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.java.time.chrono Generic API for calendar systems other than the default ISO.java.time.format Provides classes to print and parse dates and times.java.time.temporal Access to date and time using fields and units, and date time adjusters.java.util 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.java.util.stream Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.javax.management.openmbean Provides the open data types and Open MBean descriptor classes.javax.management.timer Provides the definition of the Timer MBean.Uses ofLong injava.lang
Fields injava.lang with type parameters of typeLong Modifier and Type Field Description staticClass<Long>Long. TYPETheClassinstance representing the primitive typelong.Methods injava.lang that returnLong Modifier and Type Method Description staticLongLong. decode(String nm)Decodes aStringinto aLong.staticLongLong. getLong(String nm)Determines thelongvalue of the system property with the specified name.staticLongLong. getLong(String nm, long val)Determines thelongvalue of the system property with the specified name.staticLongLong. getLong(String nm,Long val)Returns thelongvalue of the system property with the specified name.staticLongLong. valueOf(long l)Returns aLonginstance representing the specifiedlongvalue.staticLongLong. valueOf(String s)Returns aLongobject holding the value of the specifiedString.staticLongLong. valueOf(String s, int radix)Returns aLongobject holding the value extracted from the specifiedStringwhen parsed with the radix given by the second argument.Methods injava.lang with parameters of typeLong Modifier and Type Method Description intLong. compareTo(Long anotherLong)Compares twoLongobjects numerically.staticLongLong. getLong(String nm,Long val)Returns thelongvalue of the system property with the specified name.Uses ofLong injava.nio.channels
Method parameters injava.nio.channels with type arguments of typeLong Modifier and Type Method Description abstract <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 ofLong injava.time.chrono
Method parameters injava.time.chrono with type arguments of typeLong Modifier and Type Method Description ChronoLocalDateAbstractChronology. resolveDate(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle)Resolves parsedChronoFieldvalues into a date during parsing.ChronoLocalDateChronology. resolveDate(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle)Resolves parsedChronoFieldvalues into a date during parsing.LocalDateIsoChronology. resolveDate(Map<TemporalField,Long> fieldValues,ResolverStyle resolverStyle)Resolves parsedChronoFieldvalues into a date during parsing.Uses ofLong injava.time.format
Method parameters injava.time.format with type arguments of typeLong Modifier and Type Method Description DateTimeFormatterBuilderDateTimeFormatterBuilder. 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 typeLong Modifier and Type Method Description defaultTemporalAccessorTemporalField. resolve(Map<TemporalField,Long> fieldValues,TemporalAccessor partialTemporal,ResolverStyle resolverStyle)Resolves this field to provide a simpler alternative or a date.Uses ofLong injava.util
Methods injava.util that returnLong Modifier and Type Method Description defaultLongPrimitiveIterator.OfLong. next()Returns the next element in the iteration.Method parameters injava.util with type arguments of typeLong Modifier and Type Method Description default voidPrimitiveIterator.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 voidSpliterator.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 booleanSpliterator.OfLong. tryAdvance(Consumer<? superLong> action)If a remaining element exists, performs the given action on it, returningtrue; else returnsfalse.Uses ofLong injava.util.stream
Methods injava.util.stream that return types with arguments of typeLong Modifier and Type Method Description Stream<Long>LongStream. boxed()Returns aStreamconsisting of the elements of this stream, each boxed to aLong.static <T> Collector<T,?,Long>Collectors. counting()Returns aCollectoraccepting elements of typeTthat counts the number of input elements.static <T> Collector<T,?,Long>Collectors. summingLong(ToLongFunction<? super T> mapper)Returns aCollectorthat 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 typeLong Modifier and Type Field Description staticSimpleType<Long>SimpleType. LONGTheSimpleTypeinstance describing values whose Java class name isjava.lang.Long.Uses ofLong injavax.management.timer
Methods injavax.management.timer that returnLong Modifier and Type Method Description LongTimer. getNbOccurences(Integer id)Gets a copy of the remaining number of occurrences associated to a timer notification.LongTimerMBean. getNbOccurences(Integer id)Gets a copy of the remaining number of occurrences associated to a timer notification.LongTimer. getPeriod(Integer id)Gets a copy of the period (in milliseconds) associated to a timer notification.LongTimerMBean. getPeriod(Integer id)Gets a copy of the period (in milliseconds) associated to a timer notification.