/** * Simple method to walk the btree forwards or reversed and apply a function till a stop condition is reached * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, Predicate<V> stopCondition, boolean reversed) { if (reversed) applyReverse(btree, function, stopCondition); else applyForwards(btree, function, stopCondition); }
/** * Simple method to walk the btree forwards or reversed and apply a function to each element * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, boolean reversed) { if (reversed) applyReverse(btree, function, null); else applyForwards(btree, function, null); }
/** * Simple method to walk the btree forwards or reversed and apply a function to each element * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, boolean reversed) { if (reversed) applyReverse(btree, function, null); else applyForwards(btree, function, null); }
/** * Simple method to walk the btree forwards or reversed and apply a function till a stop condition is reached * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, Predicate<V> stopCondition, boolean reversed) { if (reversed) applyReverse(btree, function, stopCondition); else applyForwards(btree, function, stopCondition); }
/** * Simple method to walk the btree forwards or reversed and apply a function till a stop condition is reached * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, Predicate<V> stopCondition, boolean reversed) { if (reversed) applyReverse(btree, function, stopCondition); else applyForwards(btree, function, stopCondition); }
/** * Simple method to walk the btree forwards or reversed and apply a function till a stop condition is reached * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, Predicate<V> stopCondition, boolean reversed) { if (reversed) applyReverse(btree, function, stopCondition); else applyForwards(btree, function, stopCondition); }
/** * Simple method to walk the btree forwards or reversed and apply a function to each element * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, boolean reversed) { if (reversed) applyReverse(btree, function, null); else applyForwards(btree, function, null); }
/** * Simple method to walk the btree forwards or reversed and apply a function to each element * * Public method * */ public static <V> void apply(Object[] btree, Consumer<V> function, boolean reversed) { if (reversed) applyReverse(btree, function, null); else applyForwards(btree, function, null); }
if (applyForwards((Object[]) current, function, stopCondition)) return true;
if (applyForwards((Object[]) current, function, stopCondition)) return true;
if (applyForwards((Object[]) current, function, stopCondition)) return true;
if (applyForwards((Object[]) current, function, stopCondition)) return true;