net.sourceforge.cruisecontrol
Class DefaultLabelIncrementer

java.lang.Object
  |
  +--net.sourceforge.cruisecontrol.DefaultLabelIncrementer
All Implemented Interfaces:
LabelIncrementer

public class DefaultLabelIncrementer
extends java.lang.Object
implements LabelIncrementer

This class provides a default label incrementation. This class expects the label format to be "x.y", where x is any String and y is an integer.

Author:
alden almagro (alden@thoughtworks.com), Paul Julius (pdjulius@thoughtworks.com), ThoughtWorks, Inc. 2001

Constructor Summary
DefaultLabelIncrementer()
           
 
Method Summary
 java.lang.String incrementLabel(java.lang.String oldLabel)
          Increments the label when a successful build occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLabelIncrementer

public DefaultLabelIncrementer()
Method Detail

incrementLabel

public java.lang.String incrementLabel(java.lang.String oldLabel)
Increments the label when a successful build occurs. Assumes that the label will be in the format of "x.y", where x can be anything, and y is an integer. The y value will be incremented by one, the rest will remain the same.
Specified by:
incrementLabel in interface LabelIncrementer
Parameters:
oldLabel - Label from previous successful build.
Returns:
Label to use for most recent successful build.