public int lastIndexOfFourth(M m, int index) { try { for (int i = index; i >= 0; i--) { if ((m == null ? get(i).fourth == null : m.equals(get(i).fourth))) return i; } } catch (final Exception e) { } return -1; }
@Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Triple<?, ?, ?> triple = (Triple<?, ?, ?>) o; if (left != null ? !left.equals(triple.left) : triple.left != null) return false; if (middle != null ? !middle.equals(triple.middle) : triple.middle != null) return false; return !(right != null ? !right.equals(triple.right) : triple.right != null); }
public synchronized boolean removeFifth(M m) { Quint<T, K, L, M, N> pair; for (final Iterator<Quint<T, K, L, M, N>> i = iterator(); i.hasNext(); ) { pair = i.next(); if ((m == null ? pair.fifth == null : m.equals(pair.fifth))) { i.remove(); return true; } } return false; }
@SuppressWarnings("unchecked") @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Triple<Object, Object, Object> other = (Triple<Object, Object, Object>) obj; if (left == null) { if (other.left != null) return false; } else if (!left.equals(other.left)) return false; if (middle == null) { if (other.middle != null) return false; } else if (!middle.equals(other.middle)) return false; if (right == null) { if (other.right != null) return false; } else if (!right.equals(other.right)) return false; return true; }
public boolean containsFifth(M m) { for (final Iterator<Quint<T, K, L, M, N>> i = iterator(); i.hasNext(); ) { if ((m == null) ? i.next() == null : m.equals(i.next().fifth)) return true; } return false; }