1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.mojo.system; 6 7 /** 8 * Container that contains a mojo result and a value. 9 * 10 * @param <A> the type of the value. 11 */ 12 public class ResultAnd<A> { 13 private final int mMojoResult; 14 private final A mValue; 15 16 public ResultAnd(int result, A value) { 17 this.mMojoResult = result; 18 this.mValue = value; 19 } 20 21 /** 22 * Returns the mojo result. 23 */ 24 public int getMojoResult() { 25 return mMojoResult; 26 } 27 28 /** 29 * Returns the value. 30 */ 31 public A getValue() { 32 return mValue; 33 } 34 } 35