List of usage examples for org.apache.commons.lang3.tuple MutablePair MutablePair
public MutablePair(final L left, final R right)
From source file:com.mirth.connect.server.migration.Migrate3_2_2.java
@Override public Map<String, Object> getConfigurationPropertiesToAdd() { Map<String, Object> propertiesToAdd = new LinkedHashMap<String, Object>(); propertiesToAdd.put("server.includecustomlib", new MutablePair<Object, String>(true, "Determines whether libraries in the custom-lib directory will be included on the server classpath.\nTo reduce potential classpath conflicts you should create Resources and use them on specific channels/connectors instead, and then set this value to false.")); return propertiesToAdd; }
From source file:net.mindengine.galen.parser.ExpectCommaSeparatedKeyValue.java
@Override public List<Pair<String, String>> read(StringCharReader charReader) { List<Pair<String, String>> data = new LinkedList<Pair<String, String>>(); Pair<String, String> currentParam = null; while (charReader.hasMore()) { if (currentParam == null) { String word = new ExpectWord().read(charReader); if (!word.isEmpty()) { currentParam = new MutablePair<String, String>(word, ""); data.add(currentParam);//from w w w. java2s . co m } } else { final String value = charReader.readUntilSymbol(',').trim(); currentParam.setValue(value); currentParam = null; } } return data; }
From source file:com.karus.danktitles.commands.HelpSubcommand.java
public HelpSubcommand() { commands = new LinkedHashMap<>(DankTitles.instance.getDescription().getCommands().entrySet().stream() .collect(Collectors.toMap((e) -> e.getKey(), (e) -> new MutablePair<>((String) e.getValue().get("permission"), (String) e.getValue().get("usage"))))); }
From source file:com.galenframework.parser.ExpectCommaSeparatedKeyValue.java
@Override public List<Pair<String, String>> read(StringCharReader charReader) { List<Pair<String, String>> data = new LinkedList<Pair<String, String>>(); Pair<String, String> currentParam = null; while (charReader.hasMore()) { if (currentParam == null) { String word = new ExpectWord().read(charReader); if (!word.isEmpty()) { currentParam = new MutablePair<String, String>(word, ""); data.add(currentParam);//from w w w . ja v a 2 s . c o m } } else { final String value = charReader.readSafeUntilSymbol(',').trim(); currentParam.setValue(value); currentParam = null; } } return data; }
From source file:com.mirth.connect.client.ui.codetemplate.ContextTreeTableCellEditor.java
@Override public Object getCellEditorValue() { if (contextType != null) { return new MutablePair<Integer, ContextType>(checkBox.getState(), contextType); } else {//from w w w. jav a 2 s .c om return new MutablePair<Integer, String>(checkBox.getState(), checkBox.getText()); } }
From source file:net.dv8tion.jda.ConnectionManager.java
public void queueAudioConnect(String guildId, String channelId) { queuedAudioConnections.put(guildId, new MutablePair<>(System.currentTimeMillis(), channelId)); }
From source file:com.git.ifly6.nsapi.builders.NSNationQueryBuilder.java
public NSNationQueryBuilder addQuery(NSNationShard query, int censusId) { if (censusId != -1) { censusShards.add(new MutablePair<NSNationShard, Integer>(query, censusId)); } else {//from w w w .ja v a 2s. c o m queryShards.add(query); } return this; }
From source file:io.github.autsia.crowly.config.SecurityConfig.java
@Bean public Pair superUserCredentials() { return new MutablePair<>("admin@crowly.com", "$2a$10$asDG17pW4lVobpGZDtP4nOFSvET9fh6T3moz5OOv4fWk7i8cM4ji2"); }
From source file:fr.cvlaminck.merging.impl.DefaultValueMergers.java
@Override public ValueMerger getMerger(Class<?> fieldType, String mergingStrategy) { ValueMerger merger = null;//w ww . j av a 2s . c om Iterator<Class<?>> registeredMergerTypeIterator = registeredMergerTypes.iterator(); MutablePair<Class<?>, String> key = new MutablePair<Class<?>, String>(fieldType, mergingStrategy); Class<?> currentType = null; while (merger == null && registeredMergerTypeIterator.hasNext()) { currentType = registeredMergerTypeIterator.next(); //If the field is of or of a subclass the current type if (currentType.isAssignableFrom(fieldType)) { //We try to retrieve the associated merger //If this merger do not exists, we continue in the list. key.setLeft(currentType); merger = mergers.get(key); } } return merger; }
From source file:com.newlandframework.avatarmq.core.MessageCache.java
protected Pair<Integer, Integer> calculateBlocks(int parallel, int sizeOfTasks) { int numberOfThreads = parallel > sizeOfTasks ? sizeOfTasks : parallel; Pair<Integer, Integer> pair = new MutablePair<Integer, Integer>(new Integer(sizeOfTasks / numberOfThreads), new Integer(numberOfThreads)); return pair;/*from w w w.j ava2 s . co m*/ }