Hi;

I'm wondering if it would be possible to add a few more constructors to the Fqn 
class. In particular, I have a situation where I am always creating an Fqn from 
an existing Fqn plus some relative names. The relative names are either a 
java.util.List of Objects, or two or three individual Objects are aren't in a 
list.

There doesn't appear to be a convenient and (more importantly) efficient way of 
doing this with existing constructors, and these new constructors don't in any 
way compromise the immutability of Fqn's so, hoping you will see the benefit of 
adding them.

Here's my prototype implementation. If you'd like me to open a Jira enhancement 
on this just let me know.

   public Fqn(Fqn base, List relative) {
  |        elements.addAll(base.elements);
  |        elements.addAll(relative);
  |     }
  |    
  |    public Fqn(Fqn base, Object relative_name1, Object relative_name2) {
  |        elements.addAll(base.elements);
  |        elements.add(relative_name1);
  |        elements.add(relative_name2);
  |     }
  | 
  |    public Fqn(Fqn base, Object relative_name1, Object relative_name2, 
Object relative_name3) {
  |        elements.addAll(base.elements);
  |        elements.add(relative_name1);
  |        elements.add(relative_name2);
  |        elements.add(relative_name3);
  |     }

Thanks and regards,

Brian.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881355#3881355

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881355


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to