Example usage for com.google.common.primitives Longs max

List of usage examples for com.google.common.primitives Longs max

Introduction

In this page you can find the example usage for com.google.common.primitives Longs max.

Prototype

public static long max(long... array) 

Source Link

Document

Returns the greatest value present in array .

Usage

From source file:com.b2international.snowowl.datastore.server.history.HistoryInfoProvider.java

private static Pair<Long, Long> getPreviousAndCurrentTimestamps(final Collection<Long> longs) {
    final long[] timestamps = Longs.toArray(longs);
    final long timestamp = Longs.max(timestamps);
    final long previousTimestamp = Longs.min(timestamps) - 1L;
    return Pair.of(previousTimestamp, timestamp);
}