Class CmsNumberSuffixNameSequence

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.String>

    public class CmsNumberSuffixNameSequence
    extends java.lang.Object
    implements java.util.Iterator<java.lang.String>
    Name generator which appends a numeric suffix to a given base string.

    Since:
    8.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsNumberSuffixNameSequence​(java.lang.String str, boolean splitExtension)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      java.lang.String next()  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • CmsNumberSuffixNameSequence

        public CmsNumberSuffixNameSequence​(java.lang.String str,
                                           boolean splitExtension)
        Creates a new instance.

        Parameters:
        str - the base name which should be used for generating the names
        splitExtension - if true, the number will be inserted before the 'extension', i.e. the sequence of characters starting with the last occurrence of a dot in str.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.String>
        See Also:
        Iterator.hasNext()
      • next

        public java.lang.String next()
        Specified by:
        next in interface java.util.Iterator<java.lang.String>
        See Also:
        Iterator.next()
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.lang.String>
        See Also:
        Iterator.remove()