Java 8 Lambdas - equivalent of c# OfType
问题 I am learning the new java 8 features now, after 4 years exclusively in C# world, so lambdas are on top for me. I am now struggling to find an equivalent for C#'s "OfType" method. What I have is a List myNodes , I want to get a List out of it, where Node is an interface, and SpecificNode is implementing it. In C# it would be IList<INode> myNodes = new List<INodes>(){new SpecificNode(), new OtherNode()} IList<SpecificNode> specificNodes = myNodes.OfType<SpecificNode>() 回答1: There is no exact