Example usage for com.google.gwt.coreext.client JSOArray concat

List of usage examples for com.google.gwt.coreext.client JSOArray concat

Introduction

In this page you can find the example usage for com.google.gwt.coreext.client JSOArray concat.

Prototype

public final native JSOArray<T> concat(JSOArray<T> val) ;

Source Link

Document

Concatenate 2 arrays.

Usage

From source file:com.google.speedtracer.client.model.NetworkResource.java

License:Apache License

/**
 * Accumulates and returns any hints that were associated with records for
 * this network resource.//from   w ww .jav  a2s. com
 * 
 * @return JSOArray of HintRecords.
 */
public JSOArray<HintRecord> getHintRecords() {
    JSOArray<HintRecord> hints = JSOArray.createArray().cast();

    if (startEvent.hasHintRecords()) {
        hints = hints.concat(startEvent.getHintRecords());
    }

    if (responseEvent != null && responseEvent.hasHintRecords()) {
        hints = hints.concat(responseEvent.getHintRecords());
    }

    if (finishEvent != null && finishEvent.hasHintRecords()) {
        hints = hints.concat(finishEvent.getHintRecords());
    }

    if (hints.size() <= 0) {
        return null;
    }

    return hints;
}