aboutsummaryrefslogtreecommitdiff
path: root/mojo/public/java/system/src/org/chromium/mojo/system/ResultAnd.java
blob: 656d0d64e49f49c8478a9bb8e70394cf20693000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.mojo.system;

/**
 * Container that contains a mojo result and a value.
 *
 * @param <A> the type of the value.
 */
public class ResultAnd<A> {
    private final int mMojoResult;
    private final A mValue;

    public ResultAnd(int result, A value) {
        this.mMojoResult = result;
        this.mValue = value;
    }

    /**
     * Returns the mojo result.
     */
    public int getMojoResult() {
        return mMojoResult;
    }

    /**
     * Returns the value.
     */
    public A getValue() {
        return mValue;
    }
}