Example usage for java.lang Long MAX_VALUE

List of usage examples for java.lang Long MAX_VALUE

Introduction

In this page you can find the example usage for java.lang Long MAX_VALUE.

Prototype

long MAX_VALUE

To view the source code for java.lang Long MAX_VALUE.

Click Source Link

Document

A constant holding the maximum value a long can have, 263-1.

Usage

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);

    b.flatMap(n -> LongStream.of(n)).forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);

    b.skip(2).forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);

    b.limit(2).forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);

    b.sorted().forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    IntToLongFunction i = (x) -> Long.MAX_VALUE - x;
    System.out.println(i.applyAsLong(2));
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);
    boolean o = b.noneMatch(n -> n > 10);

    System.out.println(o);//  www. j  a v a  2 s.com
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);
    boolean o = b.allMatch(n -> n > 10);

    System.out.println(o);/*from   ww  w . ja v  a2  s  . c  o  m*/
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);
    boolean o = b.anyMatch(n -> n > 10);

    System.out.println(o);//  ww  w.j a v a2 s  .c om
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);

    b.mapToInt(n -> {/*from  www. j  av a 2s  .  co m*/
        return (int) n;
    }).forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    LongStream b = LongStream.of(1L, 2L, Long.MAX_VALUE, Long.MIN_VALUE);
    long o = b.count();

    System.out.println(o);//  ww w. ja  v a2s .co  m

}