Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #12764
| From | Jeff Higgins <jeff@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Designing Interfaces |
| Date | 2012-03-08 09:11 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jjael9$qbc$1@dont-email.me> (permalink) |
| References | <XnsA00FC7119110Ajpnasty@94.75.214.39> |
On 03/07/2012 07:27 PM, Novice wrote:
> This is actually a discussion ...
import java.io.Writer;
import java.util.Locale;
public interface Resume {
Writer write(Template t, Locale l);
}
public interface Template {
Element root();
}
// ElementVisitor ana Element
// swiped from javax.lang.model
public interface ElementVisitor<R, P> {
/**
* Visits an element.
* @param e the element to visit
* @param p a visitor-specified parameter
* @return a visitor-specified result
*/
R visit(Element e, P p);
}
import java.util.List;
import java.util.Locale;
public interface Element {
<R, P> R accept(ElementVisitor<R, P> v, P p);
AttributeSet attributes();
AttributeSet attributes(Locale l);
Element enclosingElement();
List<? extends Element> enclosedElements();
}
// AttributeSet
// swiped from javax.swing.text
public interface AttributeSet {
public int count();
public Object get(Object key);
public boolean contains(Object name, Object value);
public boolean containsAttributes(AttributeSet attributes);
public AttributeSet parent();
}
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Designing Interfaces Novice <novice@example..com> - 2012-03-08 00:27 +0000
Re: Designing Interfaces Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-08 08:28 -0400
Re: Designing Interfaces Jeff Higgins <jeff@invalid.invalid> - 2012-03-08 09:11 -0500
Re: Designing Interfaces Jeff Higgins <jeff@invalid.invalid> - 2012-03-08 09:35 -0500
Re: Designing Interfaces Jeff Higgins <jeff@invalid.invalid> - 2012-03-08 19:24 -0500
Re: Designing Interfaces Jeff Higgins <jeff@invalid.invalid> - 2012-03-08 19:36 -0500
Re: Designing Interfaces Novice <novice@example..com> - 2012-03-11 23:29 +0000
csiph-web