Yeah, I mean as a generic asFoo() type method, particularly in an
interface. I also suggest having generic bounds to suggest what types are
possible. It really depends on if the casting is useful to a user of the
library or a developer of the library.
On 14 September 2016 at 22:23, Stian
You mean to add unwrap() to the implementation classes? So it would just do
a cast? But we have an operator for that in Java... :-)
If you mean to add it to RDFTermFactory as a different name/style for the
many asSomething() methods, perhaps just as the name as()?
That is how Jena does it, to
Couldn't you do the JDBC Wrapper style interface and have a generic method
like:
T unwrap(Class cls);
Or make more specific unwrap methods like:
T unwrap(Class cls);
If this is for implementation-specific casts and such.
On 12 September 2016 at 19:56, Stian Soiland-Reyes