2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.corext.template;
10 public class TemplatePosition {
12 /** The name of the template position */
13 private final String fName;
14 /** The default value of the template position */
15 private final String fDefaultValue;
17 /** The length of the template positions. */
19 /** The offsets of the template positions. */
20 private int[] fOffsets;
21 /** A flag indicating if the template position has been resolved. */
22 private boolean fResolved;
25 * Creates a template position.
27 * @param name the name of the template position.
28 * @param defaultValue the default value of the position.
29 * @param offsets the array of offsets of the position.
30 * @param the length of the position.
32 public TemplatePosition(String name, String defaultValue, int[] offsets, int length) {
34 fDefaultValue= defaultValue;
41 * Returns the name of the position.
43 public String getName() {
48 * Returns the default value of the position.
50 public String getDefaultValue() {
55 * Sets the length of the position.
57 public void setLength(int length) {
62 * Returns the length of the position.
64 public int getLength() {
69 * Sets the offsets of the position.
71 public void setOffsets(int[] offsets) {
76 * Returns the offsets of the position.
78 public int[] getOffsets() {
83 * Sets the resolved flag of the position.
85 public void setResolved(boolean resolved) {
90 * Returns <code>true</code> if the position is resolved, <code>false</code> otherwise.
92 public boolean isResolved() {