public boolean contains(Interval<E> other) { boolean containsOtherBegin = (other.includesBegin())? contains(other.getBegin()): containsOpen(other.getBegin()); boolean containsOtherEnd = (other.includesEnd())? contains(other.getEnd()): containsOpen(other.getEnd()); return (containsOtherBegin && containsOtherEnd); }
@Override public boolean test(T in) { if (exact) { return in.getInterval().equals(target); } else { return in.getInterval().contains(target); } } }
public boolean contains(Interval<E> other) { boolean containsOtherBegin = (other.includesBegin())? contains(other.getBegin()): containsOpen(other.getBegin()); boolean containsOtherEnd = (other.includesEnd())? contains(other.getEnd()): containsOpen(other.getEnd()); return (containsOtherBegin && containsOtherEnd); }
@Override public boolean test(T in) { if (exact) { return in.getInterval().equals(target); } else { return in.getInterval().contains(target); } } }
public boolean contains(Interval<E> other) { boolean containsOtherBegin = (other.includesBegin())? contains(other.getBegin()): containsOpen(other.getBegin()); boolean containsOtherEnd = (other.includesEnd())? contains(other.getEnd()): containsOpen(other.getEnd()); return (containsOtherBegin && containsOtherEnd); }
@Override public boolean test(T in) { if (exact) { return in.getInterval().equals(target); } else { return in.getInterval().contains(target); } } }
public boolean contains(Interval<E> other) { boolean containsOtherBegin = (other.includesBegin())? contains(other.getBegin()): containsOpen(other.getBegin()); boolean containsOtherEnd = (other.includesEnd())? contains(other.getEnd()): containsOpen(other.getEnd()); return (containsOtherBegin && containsOtherEnd); }
@Override public Boolean apply(T in) { if (exact) { return in.getInterval().equals(target); } else { return in.getInterval().contains(target); } } }