All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.tablesAttributes.stg Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version

expandMethod(roleName,typeName,className) ::=
<<
   public Table expand(String... rowName)
   {
      Table result = new Table();
      result.setColumnMap(this.columnMap);
      result.setTable(this.table);
      int newColumnNumber = this.table.size() > 0 ? this.table.get(0).size() : 0;
      String newColumnName = rowName != null && rowName.length > 0 ? rowName[0] : "" + ((char)('A' + newColumnNumber));
      result.setColumnName(newColumnName);
      columnMap.put(newColumnName, newColumnNumber);

      ArrayList\ > oldTable = (ArrayList\ >) this.table.clone();
      this.table.clear();
      for (ArrayList\ row : oldTable)
      {
          start = () row.get(columnMap.get(this.getColumnName()));
         ArrayList\ newRow = (ArrayList\) row.clone();
         newRow.add(start.get());
         this.table.add(newRow);
      }
      return result;
   }
>>




cap(n) ::=
<%

%>