List of usage examples for org.apache.commons.lang3.tuple MutableTriple setRight
public void setRight(final R right)
From source file:com.artistech.tuio.mouse.MouseDriver.java
/** * Update Cursor Event.//from w w w . j a v a2 s. c o m * * @param tcur */ @Override public void updateTuioCursor(TuioCursor tcur) { logger.trace(MessageFormat.format("update tuio cursor id: {0}", tcur.getCursorID())); int width = (int) Toolkit.getDefaultToolkit().getScreenSize().getWidth(); int height = (int) Toolkit.getDefaultToolkit().getScreenSize().getHeight(); if (!curs.isEmpty() && curs.get(0).getLeft() == tcur.getSessionID()) { logger.debug(MessageFormat.format("update mouse move: ({0}, {1})", new Object[] { tcur.getScreenX(width), tcur.getScreenY(height) })); robot.mouseMove(tcur.getScreenX(width), tcur.getScreenY(height)); } for (MutableTriple<Long, Integer, Integer> trip : curs) { if (trip.getLeft() == tcur.getSessionID()) { trip.setMiddle(tcur.getScreenX(width)); trip.setRight(tcur.getScreenY(height)); break; } } }
From source file:com.drisoftie.action.async.BaseAsyncAction.java
@Override public void cancelActions() { for (ActionThread action : actionThreads) { action.setRun(false);// www.jav a2 s .com } for (ActionBinding<ViewT> binding : bindings) { binding.actionHandler = null; binding.view = null; binding.actionHandler = null; for (Triple<Class<?>, String, String[]> reg : binding.registrations) { MutableTriple<Class<?>, String, String[]> triple = (MutableTriple<Class<?>, String, String[]>) reg; triple.setRight(null); } binding.registrations = null; } bindings = null; tag1 = null; tag2 = null; tags = null; }
From source file:be.shad.tsqb.test.SelectTests.java
@Test public void selectMultiJoinedEntityValues() { Person person = query.from(Person.class); PersonProperty property1 = query.join(person.getProperties()); PersonProperty property2 = query.join(person.getProperties(), JoinType.Inner, true); query.joinWith(property1).where(property1.getPropertyKey()).eq("FavoriteColor"); query.joinWith(property2).where(property2.getPropertyKey()).eq("FavoriteDish"); @SuppressWarnings("unchecked") MutableTriple<Long, String, Object> triple = query.select(MutableTriple.class); triple.setLeft(person.getId());/*from ww w.jav a 2s . com*/ triple.setMiddle(property1.getPropertyValue()); triple.setRight(property2.getPropertyValue()); validate( "select hobj1.id as left, hobj2.propertyValue as middle, hobj3.propertyValue as right " + "from Person hobj1 " + "join hobj1.properties hobj2 with hobj2.propertyKey = :np1 " + "join hobj1.properties hobj3 with hobj3.propertyKey = :np2", "FavoriteColor", "FavoriteDish"); }
From source file:be.shad.tsqb.test.SelectTests.java
@Test public void selectNestedComponentTypeValues() { Product product = query.from(Product.class); @SuppressWarnings("unchecked") MutableTriple<String, String, Boolean> triple = query.select(MutableTriple.class); triple.setLeft(product.getName());// ww w . j a v a 2 s . com triple.setMiddle(product.getProductProperties().getPlanning().getAlgorithm()); triple.setRight(product.getProductProperties().getSales().isSalesAllowed()); validate( "select hobj1.name as left, hobj1.productProperties.planning.algorithm as middle, hobj1.productProperties.sales.salesAllowed as right from Product hobj1"); }