List of usage examples for java.lang String toUpperCase
public String toUpperCase()
From source file:th.co.geniustree.dental.spec.UnitProductSpec.java
public static Specification<UnitProduct> nameLike(final String keyword) { return new Specification<UnitProduct>() { @Override//from w ww . j a va2 s .c o m public Predicate toPredicate(Root<UnitProduct> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(UnitProduct_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.ParentSpec.java
public static Specification<Parent> emailLike(final String keyword) { return new Specification<Parent>() { @Override/*from w ww . j a va 2s . com*/ public Predicate toPredicate(Root<Parent> root, CriteriaQuery<?> query, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Parent_.email)), keyword.toUpperCase()); } }; }
From source file:com.trenako.values.LocalizedEnum.java
/** * Returns the label for the provided {@code enum} value. * * @param str the string to be parsed * @param enumType the {@code enum} type * @return a value if {@code str} is valid constant name *//*from w w w . j av a 2 s . co m*/ public static <T extends Enum<T>> T parseString(String str, Class<T> enumType) { return T.valueOf(enumType, str.toUpperCase().replace('-', '_')); }
From source file:com.jaeksoft.searchlib.util.ActiveDirectory.java
private static String getDomainName(String domain) { String[] dcs = StringUtils.split(domain.toUpperCase(), '.'); return dcs != null && dcs.length > 0 ? dcs[0] : null; }
From source file:th.co.geniustree.intenship.advisor.spec.AccountSpec.java
public static Specification<Account> nameLike(final String keyword) { return new Specification<Account>() { @Override//from w w w.j ava 2s .c o m public Predicate toPredicate(Root<Account> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Account_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.StudentSpec.java
public static Specification<Student> nameLike(final String keyword) { return new Specification<Student>() { @Override//from ww w . ja va 2s. co m public Predicate toPredicate(Root<Student> root, CriteriaQuery<?> query, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Student_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.StudentSpec.java
public static Specification<Student> emailLike(final String keyword) { return new Specification<Student>() { @Override//from ww w . j a va 2 s. c o m public Predicate toPredicate(Root<Student> root, CriteriaQuery<?> query, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Student_.email)), keyword.toUpperCase()); } }; }
From source file:edu.jhu.hlt.parma.inference.transducers.StringEditModelTrainer.java
public static String normalize(String s) { String ret = new String(s); // Upper-case everything ret = ret.toUpperCase(); // Non-alpha numeric characters only ret = ret.replaceAll("[^A-Z0-9 ]", ""); return ret;//from w ww .j ava2 s. c om }
From source file:Main.java
public static String byte2hex(byte[] b) { String hs = ""; String stmp = ""; for (int n = 0; n < b.length; n++) { stmp = (Integer.toHexString(b[n] & 0XFF)); if (stmp.length() == 1) hs = hs + "0" + stmp; else//from w w w . j a v a 2 s.co m hs = hs + stmp; } return hs.toUpperCase(); }
From source file:org.commonjava.indy.subsys.http.util.UserPass.java
public static UserPass parse(final String headerValue) { if (StringUtils.isEmpty(headerValue)) { return null; }/*from w w w. j ava 2 s . c o m*/ String userpass = null; final String upperHeader = headerValue.toUpperCase(); // logger.debug( "upper-case header value: '{}'", upperHeader ); if (upperHeader.startsWith("BASIC")) { final String[] authParts = headerValue.split(" "); // logger.debug( "split into: '{}'", Arrays.toString( authParts ) ); if (authParts.length > 1) { userpass = new String(Base64.decodeBase64(authParts[1])); // logger.debug( "Decoded BASIC userpass: {}", userpass ); } } if (userpass != null) { final String[] upStr = userpass.split(":"); if (upStr.length < 1) { return null; } return new UserPass(upStr[0], upStr.length > 1 ? upStr[1] : null); } return null; }