Search in sources :

Example 6 with IntBinaryOperator

use of java.util.function.IntBinaryOperator in project checkstyle by checkstyle.

the class Nullable method instructions.

public void instructions() {
    // used to let inputs compile
    boolean b = Math.random() > 0;
    int vint;
    Object o = null;
    List<String> vlist;
    vlist = new ArrayList<String>();
    Supplier<?> s;
    // annotations
    Map.@Nullable Entry e;
    String str = (@Nullable String) "";
    (new Inner3()).<@Nullable String>m();
    // method reference
    IntBinaryOperator ibo = Math::max;
    s = InputRegressionJava8Class1::new;
    s = Inner1.Inner2<String>::new;
    // lambda
    Runnable r1 = () -> m();
    Runnable r2 = () -> {
        m();
    };
    Collections.sort(vlist, (l, r) -> l == r ? 0 : 1);
    Predicate<?> t = (b) ? null : object -> o.equals(object);
    Double mPi = Math.PI;
}
Also used : IntBinaryOperator(java.util.function.IntBinaryOperator) Map(java.util.Map)

Aggregations

IntBinaryOperator (java.util.function.IntBinaryOperator)6 TruffleObject (com.oracle.truffle.api.interop.TruffleObject)1 Map (java.util.Map)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 IntUnaryOperator (java.util.function.IntUnaryOperator)1 Terminal (org.jline.terminal.Terminal)1 AttributedString (org.jline.utils.AttributedString)1 AttributedStringBuilder (org.jline.utils.AttributedStringBuilder)1 Test (org.junit.Test)1