Home | History | Annotate | Download | only in impl

Lines Matching refs:Pair

22 import android.util.Pair;
31 * Marshal {@link Pair} to/from any native type
34 implements MarshalQueryable<Pair<T1, T2>> {
36 private class MarshalerPair extends Marshaler<Pair<T1, T2>> {
37 private final Class<? super Pair<T1, T2>> mClass;
38 private final Constructor<Pair<T1, T2>> mConstructor;
39 /** Marshal the {@code T1} inside of {@code Pair<T1, T2>} */
41 /** Marshal the {@code T1} inside of {@code Pair<T1, T2>} */
45 protected MarshalerPair(TypeReference<Pair<T1, T2>> typeReference,
52 * Lookup the actual type arguments, e.g. Pair<Integer, Float> --> [Integer, Float]
59 throw new AssertionError("Raw use of Pair is not supported", e);
83 mConstructor = (Constructor<Pair<T1, T2>>)mClass.getConstructor(
91 public void marshal(Pair<T1, T2> value, ByteBuffer buffer) {
93 throw new UnsupportedOperationException("Pair#first must not be null");
95 throw new UnsupportedOperationException("Pair#second must not be null");
103 public Pair<T1, T2> unmarshal(ByteBuffer buffer) {
133 public int calculateMarshalSize(Pair<T1, T2> value) {
148 public Marshaler<Pair<T1, T2>> createMarshaler(TypeReference<Pair<T1, T2>> managedType,
154 public boolean isTypeMappingSupported(TypeReference<Pair<T1, T2>> managedType, int nativeType) {
155 return (Pair.class.equals(managedType.getRawType()));