Merge "Generic Mutable class for HIDL code." am: 0f05ce94c3

am: a4ac12c3ac

Change-Id: I1914e805b15064b40b963840eddf87a0bbd41169
This commit is contained in:
Steven Moreland
2018-01-08 20:25:30 +00:00
committed by android-build-merger

View File

@@ -85,6 +85,25 @@ public class HidlSupport {
return lft.equals(rgt);
}
/**
* Class which can be used to fetch an object out of a lambda. Fetching an object
* out of a local scope with HIDL is a common operation (although usually it can
* and should be avoided).
*
* @param <E> Inner object type.
*/
public static final class Mutable<E> {
public E value;
public Mutable() {
value = null;
}
public Mutable(E value) {
this.value = value;
}
}
/**
* Similar to Arrays.deepHashCode, but also take care of lists.
*/