private Condition<? super T> buildExpandConditionForChildren(T parent) {
      // implements: or(forceDisregard, not(regard));
      // and handles JBIterable.StatefulTransform and EdgeFilter conditions
      //noinspection unchecked
      Condition<? super T>[] impls = new Condition[regard.length + forceDisregard.length];
      int count = 0;
      boolean isRegard = false;
      Cond<T> c = forceDisregard;
      while (c != null) {
        if (c.impl != (isRegard ? Conditions.alwaysTrue() : Conditions.alwaysFalse())) {
          Condition<? super T> impl = JBIterable.Stateful.copy(c.impl);
          if (impl instanceof EdgeFilter) {
            ((EdgeFilter)impl).edgeSource = parent;
          }
          impls[count++] = isRegard ? not(impl) : impl;
        }
        if (c.next == null) {
          c = isRegard ? null : regard;
          isRegard = true;
        }
        else {
          c = c.next;
        }
      }
      if (count <= 0) return Conditions.alwaysFalse();
      Cond<T> result = null;
      for (int i = 0; i < count; i++) {
        result = new Cond<>(impls[count - i - 1], result);
      }
      return result.or();
    }
private Condition<? super T> buildExpandConditionForChildren(T parent)