Example usage for java.lang Long compareUnsigned

List of usage examples for java.lang Long compareUnsigned

Introduction

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

Prototype

public static int compareUnsigned(long x, long y) 

Source Link

Document

Compares two long values numerically treating the values as unsigned.

Usage

From source file:org.apache.metron.pcap.integration.PcapTopologyIntegrationTest.java

public static void assertInOrder(Iterable<byte[]> packets) {
    long previous = 0;
    for (byte[] packet : packets) {
        for (JSONObject json : TO_JSONS.apply(packet)) {
            Long current = Long.parseLong(json.get("ts_micro").toString());
            Assert.assertNotNull(current);
            Assert.assertTrue(Long.compareUnsigned(current, previous) >= 0);
            previous = current;//from   w w w  .  j  a v a 2  s. c o m
        }
    }
}