Perhaps you can say a little more about your use case here? I think we could 
probably work something out for this feature, but I am curious about why you 
are reaching for the visitor pattern?

ajs6f

> On Nov 17, 2017, at 11:27 AM, Adam Jacobs <[email protected]> wrote:
> 
> Perhaps only a single generic parameter then, if each method should return 
> the same type.
> Or a sub-interface in which all three parameters are the same, the way that 
> Java's `UnaryOperator` is related to `Function`.
> 
> 
> ________________________________________
> From: ajs6f <[email protected]>
> Sent: Friday, November 17, 2017 10:01 AM
> To: [email protected]
> Subject: Re: Generic RDFVisitor
> 
> Not sure how that would play against:
> 
> Object org.apache.jena.rdf.model.impl.ResourceImpl.visitWith(RDFVisitor)
> 
> OTOH, I'm not sure how much use the visitor pattern there has ever really 
> gotten...
> 
> ajs6f
> 
>> On Nov 17, 2017, at 10:55 AM, Adam Jacobs <[email protected]> wrote:
>> 
>> I wonder if it would be useful to generify the `RDFVisitor` interface...
>> 
>> public interface RDFVisitor<B,U,L> {
>> 
>>   B visitBlank( Resource r, AnonId id );
>>   U visitURI( Resource r, String uri );
>>   L visitLiteral( Literal l );
>> 
>> }
> 

Reply via email to