Over a million developers have joined DZone.

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);
	}

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}