public Double map(Long id) { if (id.equals(srcId)) { return 0.0; } else { return Double.POSITIVE_INFINITY; } } }
public Double map(Long id) { if (id.equals(srcId)) { return 0.0; } else { return Double.POSITIVE_INFINITY; } } }
@Override public Boolean convert(Object obj) { if (obj == null) { return false; } return Long.valueOf(1).equals(obj) || "OK".equals(obj); }
@Override public Boolean convert(Object obj) { if (obj == null) { return false; } return Long.valueOf(1).equals(obj) || "OK".equals(obj); }
@Override public Boolean convert(Object obj) { if (obj == null) { return null; } return Long.valueOf(1).equals(obj) || "OK".equals(obj); }
@Override public Boolean convert(Object obj) { if (obj == null) { return null; } return Long.valueOf(1).equals(obj) || "OK".equals(obj); }
@Override public boolean filter(VertexGroupItem<K, VV> vertexGroupItem) throws Exception { return !vertexGroupItem.getVertexGroupCount().equals(0L); } }
@Override public boolean filter(VertexGroupItem<K, VV> vertexGroupItem) throws Exception { return vertexGroupItem.getVertexGroupCount().equals(0L); } }
@Override public boolean inOrder(Tuple5<Integer, Long, Integer, String, Long> t1, Tuple5<Integer, Long, Integer, String, Long> t2) { return t1.f4 < t2.f4 || t1.f4.equals(t2.f4) && t1.f2 >= t2.f2; } }
/** To-one relationship, resolved on first access. */ @Generated public TestEntity getTestEntity() { Long __key = this.testId; if (testEntity__resolvedKey == null || !testEntity__resolvedKey.equals(__key)) { __throwIfDetached(); TestEntityDao targetDao = daoSession.getTestEntityDao(); TestEntity testEntityNew = targetDao.load(__key); synchronized (this) { testEntity = testEntityNew; testEntity__resolvedKey = __key; } } return testEntity; }
/** To-one relationship, resolved on first access. */ @Generated public TreeEntity getParent() { Long __key = this.parentId; if (parent__resolvedKey == null || !parent__resolvedKey.equals(__key)) { __throwIfDetached(); TreeEntityDao targetDao = daoSession.getTreeEntityDao(); TreeEntity parentNew = targetDao.load(__key); synchronized (this) { parent = parentNew; parent__resolvedKey = __key; } } return parent; }
@Override public void set(Integer index, V object) { ensureCapacity(index + 1); Long pre, post; do { pre = resizeCount.get(); reference.get()[index] = object; post = resizeCount.get(); } while (wasCopying(pre) || wasCopying(post) || (!pre.equals(post))); }
@Override public void invoke(Long value) throws Exception { long expected = collected * stepSize + congruence; Assert.assertTrue("Value did not match expected value. " + expected + " != " + value, value.equals(expected)); collected++; if (collected > toCollect) { Assert.fail("Collected <= toCollect: " + collected + " > " + toCollect); } }
@Override public TriggerResult onProcessingTime(long time, W window, TriggerContext ctx) throws Exception { ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc); if (fireTimestamp.get().equals(time)) { fireTimestamp.clear(); fireTimestamp.add(time + interval); ctx.registerProcessingTimeTimer(time + interval); return TriggerResult.FIRE; } return TriggerResult.CONTINUE; }
@Test public void lastModified() { ZonedDateTime now = ZonedDateTime.now(); Mono<ServerResponse> result = ServerResponse.ok().lastModified(now).build(); Long expected = now.toInstant().toEpochMilli() / 1000; StepVerifier.create(result) .expectNextMatches(response -> expected.equals(response.headers().getLastModified() / 1000)) .expectComplete() .verify(); }
@Test public void lastModified() { ZonedDateTime now = ZonedDateTime.now(); String body = "foo"; Mono<EntityResponse<String>> result = EntityResponse.fromObject(body).lastModified(now).build(); Long expected = now.toInstant().toEpochMilli() / 1000; StepVerifier.create(result) .expectNextMatches(response -> expected.equals(response.headers().getLastModified() / 1000)) .expectComplete() .verify(); }
@Test public void contentLength() { Mono<ServerResponse> result = ServerResponse.ok().contentLength(42).build(); StepVerifier.create(result) .expectNextMatches(response -> Long.valueOf(42).equals(response.headers().getContentLength())) .expectComplete() .verify(); }
@Test public void contentLength() { String body = "foo"; Mono<EntityResponse<String>> result = EntityResponse.fromObject(body).contentLength(42).build(); StepVerifier.create(result) .expectNextMatches(response -> Long.valueOf(42).equals(response.headers().getContentLength())) .expectComplete() .verify(); }