Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
// The MIT License (MIT)

import java.awt.Component;

import java.util.function.Predicate;

public class Main {
    private static <T> boolean isMatch(Component component, Class<T> type, Predicate<T> predicate) {
        return type.isInstance(component) && predicate.test(type.cast(component));
    }
}