T1
- The type of the first object.T2
- The type of the second object.public class CachedPair<T1,T2>
extends com.oracle.labs.mlrg.olcut.util.Pair<T1,T2>
The cache is calculated on construction, and the objects inside the pair are thus expected to be immutable. If they aren't then the behaviour is undefined (and you shouldn't use this class).
Constructor and Description |
---|
CachedPair(T1 a,
T2 b) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode()
Overridden hashcode.
|
static <T1,T2> ArrayList<CachedPair<T1,T2>> |
zipArraysCached(ArrayList<T1> first,
ArrayList<T2> second)
Takes two arrays and zips them together into an array of CachedPairs.
|
public static <T1,T2> ArrayList<CachedPair<T1,T2>> zipArraysCached(ArrayList<T1> first, ArrayList<T2> second)
T1
- The type contained in the first array.T2
- The type contained in the second array.first
- An array of values.second
- Another array of values.public int hashCode()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.