Java Code Examples for com.intellij.openapi.util.Condition#TRUE
The following examples show how to use
com.intellij.openapi.util.Condition#TRUE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FilteredTraverserBase.java From consulo with Apache License 2.0 | 6 votes |
private Condition<? super T> buildExpandConditionForChildren(T parent) { // implements: or2(forceExpandAndSkip, not(childFilter)); // and handles JBIterable.StatefulTransform and EdgeFilter conditions Cond copy = null; boolean invert = true; Cond c = regard; while (c != null) { Condition impl = JBIterable.Stateful.copy(c.impl); if (impl != (invert ? Condition.TRUE : Condition.FALSE)) { copy = new Cond<Object>(invert ? not(impl) : impl, copy); if (impl instanceof EdgeFilter) { ((EdgeFilter)impl).edgeSource = parent; } } if (c.next == null) { c = invert ? forceDisregard : null; invert = false; } else { c = c.next; } } return copy == null ? Condition.FALSE : copy.OR; }
Example 2
Source File: FilteringIterator.java From consulo with Apache License 2.0 | 4 votes |
public static <Dom, T extends Dom> Iterator<T> create(Iterator<Dom> iterator, Condition<? super Dom> condition) { if (condition == Condition.TRUE || condition == Conditions.TRUE) return (Iterator<T>)iterator; return new FilteringIterator<Dom, T>(iterator, condition); }
Example 3
Source File: IfPostfixTemplateBase.java From consulo with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") protected IfPostfixTemplateBase(@Nonnull PostfixTemplatePsiInfo psiInfo) { super("if", "if (expr)", psiInfo, Condition.TRUE); }
Example 4
Source File: StatementWrapPostfixTemplate.java From consulo with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") protected StatementWrapPostfixTemplate(@Nonnull String name, @Nonnull String descr, @Nonnull PostfixTemplatePsiInfo psiInfo) { super(name, descr, psiInfo, Condition.TRUE); }
Example 5
Source File: ElseExpressionPostfixTemplateBase.java From consulo with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") protected ElseExpressionPostfixTemplateBase(@Nonnull PostfixTemplatePsiInfo psiInfo) { super("else", "if (!exp)", psiInfo, Condition.TRUE); }