summaryrefslogtreecommitdiff
path: root/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesCollection.java
diff options
context:
space:
mode:
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesCollection.java')
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesCollection.java78
1 files changed, 37 insertions, 41 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesCollection.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesCollection.java
index ee9bfd442bca..ca8687541545 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesCollection.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/VariablesCollection.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.layoutprocessor;
import java.util.ArrayList;
@@ -50,54 +48,52 @@ import java.util.List;
*/
public class VariablesCollection
{
- private VariablesCollection parent;
- private String namePrefix;
- private List variables;
- public VariablesCollection(final String namePrefix)
- {
- this(namePrefix, null);
- }
+ private VariablesCollection parent;
+ private String namePrefix;
+ private List variables;
- public VariablesCollection(final String namePrefix, final VariablesCollection parent)
- {
- if (namePrefix == null)
+ public VariablesCollection(final String namePrefix)
{
- throw new NullPointerException("NamePrefix cannot be null");
+ this(namePrefix, null);
}
- this.namePrefix = namePrefix;
- this.parent = parent;
- this.variables = new ArrayList();
- }
-
- public VariablesCollection getParent()
- {
- return parent;
- }
+ public VariablesCollection(final String namePrefix, final VariablesCollection parent)
+ {
+ if (namePrefix == null)
+ {
+ throw new NullPointerException("NamePrefix cannot be null");
+ }
- public String getNamePrefix()
- {
- return namePrefix;
- }
+ this.namePrefix = namePrefix;
+ this.parent = parent;
+ this.variables = new ArrayList();
+ }
- public String addVariable (final FormattedTextElement element)
- {
- variables.add(element);
- final int size = variables.size();
- return namePrefix + size;
- }
+ public VariablesCollection getParent()
+ {
+ return parent;
+ }
- public FormattedTextElement[] getVariables ()
- {
- return (FormattedTextElement[])
- variables.toArray(new FormattedTextElement[variables.size()]);
- }
+ public String getNamePrefix()
+ {
+ return namePrefix;
+ }
- public int getVariablesCount ()
- {
- return variables.size();
- }
+ public String addVariable(final FormattedTextElement element)
+ {
+ variables.add(element);
+ final int size = variables.size();
+ return namePrefix + size;
+ }
+ public FormattedTextElement[] getVariables()
+ {
+ return (FormattedTextElement[]) variables.toArray(new FormattedTextElement[variables.size()]);
+ }
+ public int getVariablesCount()
+ {
+ return variables.size();
+ }
}