
com.github.davidmoten.odata.client.internal.Checks Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-runtime Show documentation
Show all versions of odata-client-runtime Show documentation
OData client runtime for use with generated code
The newest version!
package com.github.davidmoten.odata.client.internal;
import java.nio.charset.StandardCharsets;
import java.util.List;
public final class Checks {
private Checks() {
// prevent instantiation
}
public static String checkIsAscii(String v) {
if (v != null && !StandardCharsets.US_ASCII.newEncoder().canEncode(v)) {
throw new IllegalArgumentException("illegal encoding, must be ascii: " + v);
} else {
return v;
}
}
public static List checkIsAscii(List list) {
list.forEach(Checks::checkIsAscii);
return list;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy