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

org.anc.util.PrefixedIDGenerator Maven / Gradle / Ivy

The newest version!
package org.anc.util;

public class PrefixedIDGenerator extends IDGenerator
{
   private String prefix;
   
   public PrefixedIDGenerator(String prefix)
   {
      super();
      this.prefix = prefix;
   }
   
   @Override
   public String generate(String type)
   {
      String id = super.generate(type);
      if (prefix != null)
      {
         return prefix + "-" + id;
      }
      return id;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy