Example usage for com.google.common.collect Tables transpose

List of usage examples for com.google.common.collect Tables transpose

Introduction

In this page you can find the example usage for com.google.common.collect Tables transpose.

Prototype

public static <R, C, V> Table<C, R, V> transpose(Table<R, C, V> table) 

Source Link

Document

Creates a transposed view of a given table that flips its row and column keys.

Usage

From source file:reflex.value.ReflexSparseMatrixValue.java

public ReflexSparseMatrixValue transpose() {
    ReflexSparseMatrixValue ret = new ReflexSparseMatrixValue(2);
    ret.table = Tables.transpose(table);
    return ret;
}

From source file:com.google.gerrit.server.notedb.ChangeNotesParser.java

private ChangeNotesState buildState() {
    return ChangeNotesState.create(tip.copy(), id, new Change.Key(changeId), createdOn, lastUpdatedOn, ownerId,
            branch, buildCurrentPatchSetId(), subject, topic, originalSubject, submissionId,
            assignee != null ? assignee.orElse(null) : null, status,
            Sets.newLinkedHashSet(Lists.reverse(pastAssignees)), hashtags, patchSets, buildApprovals(),
            ReviewerSet.fromTable(Tables.transpose(reviewers)),
            ReviewerByEmailSet.fromTable(Tables.transpose(reviewersByEmail)), allPastReviewers,
            buildReviewerUpdates(), submitRecords, buildAllMessages(), buildMessagesByPatchSet(), comments,
            readOnlyUntil, isPrivate);/* w w w  .  j  a  v  a  2  s. c o  m*/
}