Example usage for com.google.common.base CharMatcher matchesNoneOf

List of usage examples for com.google.common.base CharMatcher matchesNoneOf

Introduction

In this page you can find the example usage for com.google.common.base CharMatcher matchesNoneOf.

Prototype

public boolean matchesNoneOf(CharSequence sequence) 

Source Link

Document

Returns true if a character sequence contains no matching characters.

Usage

From source file:com.facebook.presto.bytecode.instruction.InvokeInstruction.java

private static void checkUnqualifiedName(String name) {
    // JVM Specification 4.2.2 Unqualified Names
    requireNonNull(name, "name is null");
    checkArgument(!name.isEmpty(), "name is empty");
    if (name.equals("<init>") || name.equals("<clinit>")) {
        return;//from w w w .  j  a  v a 2s .c o m
    }
    CharMatcher invalid = CharMatcher.anyOf(".;[/<>");
    checkArgument(invalid.matchesNoneOf(name), "invalid name: %s", name);
}

From source file:com.google.template.soy.base.internal.UniqueNameGenerator.java

public UniqueNameGenerator(CharMatcher bannedCharacters, String collisionSeparator) {
    checkArgument(bannedCharacters.matchesNoneOf(collisionSeparator), "separator %s contains banned characters",
            collisionSeparator);/*from  w  w  w .j  a v  a 2s .  c  o m*/
    this.bannedCharacters = bannedCharacters;
    this.collisionSeparator = collisionSeparator;
}