本文整理汇总了Java中org.javatuples.Triplet.getValue2方法的典型用法代码示例。如果您正苦于以下问题:Java Triplet.getValue2方法的具体用法?Java Triplet.getValue2怎么用?Java Triplet.getValue2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.javatuples.Triplet
的用法示例。
在下文中一共展示了Triplet.getValue2方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onAttachmentReceived
import org.javatuples.Triplet; //导入方法依赖的package包/类
private void onAttachmentReceived(BotMessage botMsg, Message message,
String fileId, BotDocumentType type,
String msgId) {
try {
Triplet<byte[], String, String> data = downloadFromFileId(fileId);
BotTextMessage textMessage = new BotTextMessage(botMsg, message.getCaption());
BotDocumentMessage documentMessage = new BotDocumentMessage(textMessage,
data.getValue1(), data.getValue2(), data.getValue0(), type);
botsController.sendMessage(documentMessage,
Long.toString(message.getChatId()), Optional.of(msgId));
} catch (TelegramApiException | IOException e) {
logger.error("Error loading the media received. ", e);
}
}
示例2: asList
import org.javatuples.Triplet; //导入方法依赖的package包/类
@Test
public void asList() throws Exception {
final Instant now = now();
final RestModel restModel = RestModel.newRestModel();
final List<Triplet<Class<?>, Object, Object>> fixtures = new ArrayList<>();
fixtures.add(new Triplet<>(Boolean.class, Arrays.asList(true), Arrays.asList(true)));
fixtures.add(new Triplet<>(Byte.class, Arrays.asList((byte) 1), Arrays.asList((byte) 1)));
fixtures.add(new Triplet<>(Short.class, Arrays.asList((short) 1), Arrays.asList((short) 1)));
fixtures.add(new Triplet<>(Integer.class, Arrays.asList(1), Arrays.asList(1)));
fixtures.add(new Triplet<>(Long.class, Arrays.asList(1l), Arrays.asList(1l)));
fixtures.add(new Triplet<>(String.class, Arrays.asList("name"), Arrays.asList("name")));
fixtures.add(new Triplet<>(State.class, Arrays.asList("BLOCKED"), Arrays.asList(BLOCKED)));
fixtures.add(new Triplet<>(Instant.class, Arrays.asList(now), Arrays.asList(now)));
fixtures.add(new Triplet<>(RestModel.class, Arrays.asList(restModel), Arrays.asList(restModel)));
for (int i = 0; i < fixtures.size(); i++) {
final Triplet<Class<?>, Object, Object> fixture = fixtures.get(i);
final Class<?> type = fixture.getValue0();
final Object input = fixture.getValue1();
final Object expected = fixture.getValue2();
final List<?> output = new RestValue(input).asListOf(type);
assertEquals(expected, output);
}
}
示例3: add
import org.javatuples.Triplet; //导入方法依赖的package包/类
@Override
public void add(Triplet<R, C, V> triplet) {
R row = triplet.getValue0();
GroupCollector<R, R2> rowCollector = rowCollectors.get(row);
if (rowCollector == null) {
rowCollector = rowExpression.createGroupCollector();
rowCollectors.put(row, rowCollector);
}
rowCollector.add(row);
C column = triplet.getValue1();
GroupCollector<C, C2> columnCollector = columnCollectors.get(column);
if (columnCollector == null) {
columnCollector = columnExpression.createGroupCollector();
columnCollectors.put(column, columnCollector);
}
columnCollector.add(column);
GroupCollector<V, V2> valueCollector = valueCollectors.get(rowCollector, columnCollector);
if (valueCollector == null) {
valueCollector = valueExpression.createGroupCollector();
valueCollectors.put(rowCollector, columnCollector, valueCollector);
}
V value = triplet.getValue2();
valueCollector.add(value);
}
示例4: getMethodNode
import org.javatuples.Triplet; //导入方法依赖的package包/类
public static MethodNode getMethodNode(int access, String method) {
Triplet<String, String, String[]> methodDesc = ASMNames.getSrgNameMd(method);
String sig = methodDesc.getValue2().length > 1 ? methodDesc.getValue2()[1] : null;
String throwing[] = methodDesc.getValue2().length > 2 ? methodDesc.getValue2()[2].split(";") : null;
return new MethodNode(access, methodDesc.getValue1(), methodDesc.getValue2()[0], sig, throwing);
}
示例5: setupComplete
import org.javatuples.Triplet; //导入方法依赖的package包/类
private void setupComplete(Triplet<KeyStore, KeyStore, String> keystoreAux, Timer timer) {
KeyStore keystore = keystoreAux.getValue0();
KeyStore truststore = keystoreAux.getValue1();
String certPswd = keystoreAux.getValue2();
delaStateCtrl.hopssiteCertsAvailable(keystore, truststore, certPswd);
delaVersion(resetToDelaVersion(timer));
}
示例6: getQueueCount
import org.javatuples.Triplet; //导入方法依赖的package包/类
private int getQueueCount(){
if (_collector instanceof CoordinatedOutputCollector) {
Triplet<Integer, Integer, Integer> queues = ((CoordinatedOutputCollector) _collector)
.getUnackedAndLocalQueueAndRemoteQueeuCount_ThreadUnsafe();
int unacked = queues.getValue0();
int local = queues.getValue1();
int remote = queues.getValue2();
_operationLogger.writeLog("Queue Sizes = Unacked: " + unacked + " Local: " + local + " Remote: "
+ remote, OperationLogger.LogPriority.SYSTEM);
return unacked + local + remote;
}
return 0;
}
示例7: getMethodInsnNode
import org.javatuples.Triplet; //导入方法依赖的package包/类
public static MethodInsnNode getMethodInsnNode(int opcode, String method, boolean intf) {
Triplet<String, String, String[]> methodDesc = ASMNames.getSrgNameMd(method);
return new MethodInsnNode(opcode, methodDesc.getValue0(), methodDesc.getValue1(), methodDesc.getValue2()[0], intf);
}
示例8: getFieldInsnNode
import org.javatuples.Triplet; //导入方法依赖的package包/类
public static FieldInsnNode getFieldInsnNode(int opcode, String field) {
Triplet<String, String, String> fieldDesc = ASMNames.getSrgNameFd(field);
return new FieldInsnNode(opcode, fieldDesc.getValue0(), fieldDesc.getValue1(), fieldDesc.getValue2());
}