List of usage examples for org.apache.commons.lang3 StringUtils uncapitalize
public static String uncapitalize(final String str)
Uncapitalizes a String, changing the first letter to lower case as per Character#toLowerCase(char) .
From source file:com.mirth.connect.donkey.util.purge.PurgeUtil.java
private static Map.Entry<?, ?> getPurgedEntry(Map.Entry<?, ?> originalEntry) { Object originalKey = originalEntry.getKey(); Object originalValue = originalEntry.getValue(); String key = StringUtils.uncapitalize(originalKey.toString()); Object value = originalValue; if (originalValue instanceof String[]) { key += "Count"; value = ArrayUtils.getLength(originalValue); } else if (originalValue instanceof ArrayList<?>) { key += "Count"; value = ((ArrayList<Object>) originalValue).size(); } else if (originalValue instanceof Map<?, ?>) { key += "Count"; value = ((Map<Object, Object>) originalValue).size(); } else {/*from w w w . j a v a2 s . c om*/ return null; } return new AbstractMap.SimpleEntry(key, value); }
From source file:de.adorsys.forge.gwt.VelocityUtil.java
public String uncapitalize(String orgString) { return StringUtils.uncapitalize(orgString); }
From source file:kenh.expl.functions.Uncapitalize.java
public String process(String text) { return StringUtils.uncapitalize(text); }
From source file:com.spectralogic.ds3autogen.utils.Helper.java
public static String uncapFirst(final String str) { return StringUtils.uncapitalize(str); }
From source file:info.novatec.testit.livingdoc.util.NameUtils.java
public static String toLowerCamelCase(String s) { if (StringUtils.isBlank(s)) { return s.trim(); }/* ww w .ja v a2s . com*/ return StringUtils.uncapitalize(StringUtils.deleteWhitespace(WordUtils.capitalizeFully(s))); }
From source file:com.mgmtp.jfunk.data.source.ContainerDataSource.java
@Inject public ContainerDataSource(final Provider<List<? extends DataSource>> dataSourcesProvider) { this.dataSourcesProvider = dataSourcesProvider; this.name = StringUtils.uncapitalize(StringUtils.substringBefore(getClass().getSimpleName(), "DataSource")); }
From source file:fr.cvlaminck.merging.impl.mergers.object.DefaultObjectMerger.java
private String getFieldNameFromGetter(Method getter) { return StringUtils.uncapitalize(getter.getName().substring(3)); }
From source file:com.yunkouan.lpid.atmosphere.config.ComponentConfiguration.java
@Bean public ObjectMapper objectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setPropertyNamingStrategy(new PropertyNamingStrategy() { @Override//from w w w. j av a2 s . c om public String nameForField(MapperConfig<?> config, AnnotatedField field, String defaultName) { return StringUtils.uncapitalize(field.getName()); } }); return mapper; }
From source file:net.rptools.layercontrol.LayerStackLayer.java
/** * Move the layer./* w w w. j av a 2 s.c o m*/ * @param offset offset by which to move * @param layer layer to move */ @ThreadPolicy(ThreadPolicy.ThreadId.JFX) public void move(final int offset, final Layer layer) { final Node node = getDrawable().lookup("#" + StringUtils.uncapitalize(layer.getName())); final int idx = getDrawable().getChildren().indexOf(node); getDrawable().getChildren().remove(node); getDrawable().getChildren().add(idx - offset, node); }
From source file:com.mgmtp.jfunk.data.source.BaseDataSource.java
/** * Creates a new instance of the data source, reading fixed properties from the configuration. * /*from w w w . jav a2s .c o m*/ * @param configuration * Configuration for the data source. */ protected BaseDataSource(final Configuration configuration) { this.name = StringUtils.uncapitalize(StringUtils.substringBefore(getClass().getSimpleName(), "DataSource")); this.configuration = configuration; }