/** * Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then * this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. * If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. * * @see #hasPositionInformation */ @Override public Object getKnownPositionElement(boolean allowApproximateLocation) { Object node = data.get(p); if (hasPositionInformation(node)) { return node; } if (!allowApproximateLocation) { return null; } for (int index = p - 1; index >= 0; index--) { node = data.get(index); if (hasPositionInformation(node)) { return node; } } return previousLocationElement; }
/** * Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then * this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. * If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. * * @see #hasPositionInformation */ @Override public Object getKnownPositionElement(boolean allowApproximateLocation) { Object node = data.get(p); if (hasPositionInformation(node)) { return node; } if (!allowApproximateLocation) { return null; } for (int index = p - 1; index >= 0; index--) { node = data.get(index); if (hasPositionInformation(node)) { return node; } } return previousLocationElement; }
/** * Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then * this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. * If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. * * @see #hasPositionInformation */ @Override public Object getKnownPositionElement(boolean allowApproximateLocation) { Object node = data.get(p); if (hasPositionInformation(node)) { return node; } if (!allowApproximateLocation) { return null; } for (int index = p - 1; index >= 0; index--) { node = data.get(index); if (hasPositionInformation(node)) { return node; } } return previousLocationElement; }
/** * Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then * this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. * If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. * * @see #hasPositionInformation */ @Override public Object getKnownPositionElement(boolean allowApproximateLocation) { Object node = data.get(p); if (hasPositionInformation(node)) { return node; } if (!allowApproximateLocation) { return null; } for (int index = p - 1; index >= 0; index--) { node = data.get(index); if (hasPositionInformation(node)) { return node; } } return previousLocationElement; }
/** * Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then * this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. * If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information. * * @see #hasPositionInformation */ @Override public Object getKnownPositionElement(boolean allowApproximateLocation) { Object node = data.get(p); if (hasPositionInformation(node)) { return node; } if (!allowApproximateLocation) { return null; } for (int index = p - 1; index >= 0; index--) { node = data.get(index); if (hasPositionInformation(node)) { return node; } } return previousLocationElement; }
@Override public Object remove() { Object result = super.remove(); if (p == 0 && hasPositionInformation(prevElement)) { previousLocationElement = prevElement; } return result; }
@Override public Object remove() { Object result = super.remove(); if (p == 0 && hasPositionInformation(prevElement)) { previousLocationElement = prevElement; } return result; }
@Override public Object remove() { Object result = super.remove(); if (p == 0 && hasPositionInformation(prevElement)) { previousLocationElement = prevElement; } return result; }
@Override public Object remove() { Object result = super.remove(); if (p == 0 && hasPositionInformation(prevElement)) { previousLocationElement = prevElement; } return result; }
@Override public Object remove() { Object result = super.remove(); if (p == 0 && hasPositionInformation(prevElement)) { previousLocationElement = prevElement; } return result; }