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

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

Introduction

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

Prototype

public static int indexOf(long[] array, long[] target) 

Source Link

Document

Returns the start position of the first occurrence of the specified target within array , or -1 if there is no such occurrence.

Usage

From source file:com.analog.lyric.dimple.model.variables.VariableBlock.java

@NonNullByDefault(false)
@Override/* ww w .j  av a 2  s . co m*/
public int indexOf(Object obj) {
    if (obj instanceof Variable) {
        Variable var = (Variable) obj;
        if (var.getRootGraph() == requireParentGraph().getRootGraph()) {
            return Longs.indexOf(_variableGraphTreeIds, var.getGraphTreeId());
        }
    }

    return -1;
}