Example usage for java.util.function IntPredicate IntPredicate

List of usage examples for java.util.function IntPredicate IntPredicate

Introduction

In this page you can find the example usage for java.util.function IntPredicate IntPredicate.

Prototype

IntPredicate

Source Link

Usage

From source file:com.qwazr.utils.StringUtils.java

public static boolean anyDigit(CharSequence chars) {
    if (chars == null)
        return false;
    return chars.chars().anyMatch(new IntPredicate() {
        @Override/*from w  ww.  j av a2 s  . co m*/
        public boolean test(int value) {
            return Character.isDigit(value);
        }
    });
}

From source file:com.qwazr.utils.StringUtils.java

public static boolean anyAlpha(CharSequence chars) {
    if (chars == null)
        return false;
    return chars.chars().anyMatch(new IntPredicate() {
        @Override/*from   w  w  w  .  ja v  a 2  s.  c o m*/
        public boolean test(int value) {
            return Character.isAlphabetic(value);
        }
    });
}