public Node<T> trimByVisibility() { if (next == null) { return this; } Node<T> newNext = next.trimByVisibility(); if (explicitName != null) { // this already has highest; how about next one? if (newNext.explicitName == null) { // next one not, drop it return withNext(null); } // both have it, keep return withNext(newNext); } if (newNext.explicitName != null) { // next one has higher, return it... return newNext; } // neither has explicit name; how about visibility? if (isVisible == newNext.isVisible) { // same; keep both in current order return withNext(newNext); } return isVisible ? withNext(null) : newNext; }
public Node<T> trimByVisibility() { if (next == null) { return this; } Node<T> newNext = next.trimByVisibility(); if (explicitName != null) { // this already has highest; how about next one? if (newNext.explicitName == null) { // next one not, drop it return withNext(null); } // both have it, keep return withNext(newNext); } if (newNext.explicitName != null) { // next one has higher, return it... return newNext; } // neither has explicit name; how about visibility? if (isVisible == newNext.isVisible) { // same; keep both in current order return withNext(newNext); } return isVisible ? withNext(null) : newNext; }
public Node<T> withoutIgnored() { if (isMarkedIgnored) { return (next == null) ? null : next.withoutIgnored(); } if (next != null) { Node<T> newNext = next.withoutIgnored(); if (newNext != next) { return withNext(newNext); } } return this; }
public Node<T> withoutIgnored() { if (isMarkedIgnored) { return (next == null) ? null : next.withoutIgnored(); } if (next != null) { Node<T> newNext = next.withoutIgnored(); if (newNext != next) { return withNext(newNext); } } return this; }
public Node<T> withoutNonVisible() { Node<T> newNext = (next == null) ? null : next.withoutNonVisible(); return isVisible ? withNext(newNext) : newNext; }
public Node<T> withoutNonVisible() { Node<T> newNext = (next == null) ? null : next.withoutNonVisible(); return isVisible ? withNext(newNext) : newNext; }
public Node<T> trimByVisibility() { if (next == null) { return this; } Node<T> newNext = next.trimByVisibility(); if (explicitName != null) { // this already has highest; how about next one? if (newNext.explicitName == null) { // next one not, drop it return withNext(null); } // both have it, keep return withNext(newNext); } if (newNext.explicitName != null) { // next one has higher, return it... return newNext; } // neither has explicit name; how about visibility? if (isVisible == newNext.isVisible) { // same; keep both in current order return withNext(newNext); } return isVisible ? withNext(null) : newNext; }
public Node<T> withoutNonVisible() { Node<T> newNext = (next == null) ? null : next.withoutNonVisible(); return isVisible ? withNext(newNext) : newNext; }
public Node<T> withoutIgnored() { if (isMarkedIgnored) { return (next == null) ? null : next.withoutIgnored(); } if (next != null) { Node<T> newNext = next.withoutIgnored(); if (newNext != next) { return withNext(newNext); } } return this; }
public Node<T> trimByVisibility() { if (next == null) { return this; } Node<T> newNext = next.trimByVisibility(); if (explicitName != null) { // this already has highest; how about next one? if (newNext.explicitName == null) { // next one not, drop it return withNext(null); } // both have it, keep return withNext(newNext); } if (newNext.explicitName != null) { // next one has higher, return it... return newNext; } // neither has explicit name; how about visibility? if (isVisible == newNext.isVisible) { // same; keep both in current order return withNext(newNext); } return isVisible ? withNext(null) : newNext; }
public Node<T> withoutIgnored() { if (isMarkedIgnored) { return (next == null) ? null : next.withoutIgnored(); } if (next != null) { Node<T> newNext = next.withoutIgnored(); if (newNext != next) { return withNext(newNext); } } return this; }
public Node<T> withoutNonVisible() { Node<T> newNext = (next == null) ? null : next.withoutNonVisible(); return isVisible ? withNext(newNext) : newNext; }