DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Eclipse Template Example
// Template to generate accessors to a List in the current class
public Integer get${F:field(java.util.List)}Length() {
return ${f:field(java.util.List)}.size();
}
public void add${F:field(java.util.List)}(${t:elemType(f)} ${f:field(java.util.List)}) {
this.${f:field(java.util.List)}.add(${f:field(java.util.List)});
}
public boolean remove${F:field(java.util.List)}(Integer index) {
return this.${f:field(java.util.List)}.remove(index);
}
public ${t:elemType(f)} get${F:field(java.util.List)}(Integer index) {
return this.${f:field(java.util.List)}.get(index);
}





