@Test public void testVisitIndividual$null() throws Exception { Individual<ManagedIndividualId, ?> individual = exampleDataSet().individualOfId(managedIndividualId(RESOURCE_NAME.id(), MANAGER_ID)); @SuppressWarnings("rawtypes") IndividualExtractor<Name, LocalIndividual> sut = IndividualExtractor.newInstance(LocalIndividual.class); sut.visitIndividual(individual); assertThat(sut.isAvailable(),equalTo(false)); assertThat(sut.getValue(),nullValue()); }
@Override public void visitIndividual(Individual<?, ?> value) { if(this.clazz.isInstance(value)) { this.value = clazz.cast(value); } }
IndividualExtractor implements ValueVisitor { @Override public void visitIndividual(Individual<?, ?> value) { if(this.clazz.isInstance(value)) { this.value = clazz.cast(value); } } }
IndividualExtractor implements ValueVisitor { @Override public void visitIndividual(Individual<?, ?> value) { if(this.clazz.isInstance(value)) { this.value = clazz.cast(value); } } private  IndividualExtractor(final Class<? extends S> clazz); }
IndividualExtractor implements ValueVisitor { @Override public void visitIndividual(Individual<?, ?> value) { if(this.clazz.isInstance(value)) { this.value = clazz.cast(value); } } private  IndividualExtractor(final Class<? extends S> clazz); @Override void visitLiteral(Literal<?> value); @Override void visitIndividual(Individual<?, ?> value); }
IndividualExtractor implements ValueVisitor { @Override public void visitIndividual(Individual<?, ?> value) { if(this.clazz.isInstance(value)) { this.value = clazz.cast(value); } } private  IndividualExtractor(final Class<? extends S> clazz); @Override void visitLiteral(Literal<?> value); @Override void visitIndividual(Individual<?, ?> value);  }