本文整理汇总了Java中org.javatuples.Triplet.getValue1方法的典型用法代码示例。如果您正苦于以下问题:Java Triplet.getValue1方法的具体用法?Java Triplet.getValue1怎么用?Java Triplet.getValue1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.javatuples.Triplet
的用法示例。
在下文中一共展示了Triplet.getValue1方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: addEntry
import org.javatuples.Triplet; //导入方法依赖的package包/类
@Override
public void addEntry(Integer upstreamTask, Object originId, Object tupleId) {
for(Triplet<Integer, Object, TupleIdSet> ee : _buffer) {
if (ee.getValue0() == upstreamTask) {
if (ee.getValue1() == null) {
if (originId == null) {
ee.getValue2().add(tupleId);
return;
}
} else if (ee.getValue1().equals(originId)) {
ee.getValue2().add(tupleId);
return;
}
}
}
TupleIdSet tupleSet = new UncompressedTupleIdSet();
_buffer.add(new Triplet<Integer, Object, TupleIdSet>(upstreamTask, originId, tupleSet ));
tupleSet.add(tupleId);
}
示例5: ensureEntry
import org.javatuples.Triplet; //导入方法依赖的package包/类
@Override
public void ensureEntry(Integer upstreamTask, Object originTuple) {
for(Triplet<Integer, Object, TupleIdSet> ee : _buffer) {
if (ee.getValue0() == upstreamTask) {
if (ee.getValue1() == null) {
if (originTuple == null) {
return;
}
} else if (ee.getValue1().equals(originTuple)) {
return;
}
}
}
TupleIdSet tupleSet = new UncompressedTupleIdSet();
_buffer.add(new Triplet<Integer, Object, TupleIdSet>(upstreamTask, originTuple, tupleSet ));
}
示例6: 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);
}
示例7: 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));
}
示例8: 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;
}
示例9: checkBases
import org.javatuples.Triplet; //导入方法依赖的package包/类
private static boolean checkBases(Triplet<Integer, Integer, Integer> i0,
Triplet<Integer, Integer, Integer> i1, Triplet<Integer, Integer, Integer> i2,
Triplet<Integer, Integer, Integer> i3, Triplet<Integer, Integer, Integer> i4,
Triplet<Integer, Integer, Integer> i5) {
return i0.getValue1() != i1.getValue1() && i0.getValue1() != i2.getValue1() && i0.getValue1() != i3.getValue1() && i0.getValue1() != i4.getValue1() && i0.getValue1() != i5.getValue1()
&& i1.getValue1() != i2.getValue1() && i1.getValue1() != i3.getValue1() && i1.getValue1() != i4.getValue1() && i1.getValue1() != i5.getValue1()
&& i2.getValue1() != i3.getValue1() && i2.getValue1() != i4.getValue1() && i2.getValue1() != i5.getValue1()
&& i3.getValue1() != i4.getValue1() && i3.getValue1() != i5.getValue1()
&& i4.getValue1() != i5.getValue1();
}
示例10: 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);
}
示例11: 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());
}