获取List对象获取对象等于某值的对象

        Optional first = investorVOList.stream().filter(item -> item.getInvestorName().equals("张三")).findFirst();
        String investoRatio = first.get().getInvestoRatio();

获取List对象中 属性为值为张三的对象 

你可能感兴趣的:(java,List对象获取对象等于某值)