Class AttributeNameTokenizer.TokensIterator
- java.lang.Object
-
- org.eclipse.persistence.internal.mappings.converters.AttributeNameTokenizer.TokensIterator
-
- Enclosing class:
- AttributeNameTokenizer
public static final class AttributeNameTokenizer.TokensIterator extends Object implements Iterator<String>
INTERNAL: Attribute name tokenizer parser implemented as anIterator<String>
over individual attribute name tokens.
-
-
Constructor Summary
Constructors Constructor Description TokensIterator(String attributeName)
INTERNAL: Creates an instance of attribute name tokenizer iterator.TokensIterator(String attributeName, boolean isPrefix)
INTERNAL: Creates an instance of attribute name tokenizer iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeNamePrefix
getPrefix()
INTERNAL: Get attribute name prefix.boolean
hasNext()
INTERNAL: Returnstrue
if the iteration has more elements.String
next()
INTERNAL: Return the next attribute name token from attribute name.void
remove()
INTERNAL: Removal of attribute name tokens makes no sense.-
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
-
TokensIterator
public TokensIterator(String attributeName)
INTERNAL: Creates an instance of attribute name tokenizer iterator. Simple parser without prefix parsing will be used so ("key."
and"value."
) will be returned as regular attribute name tokens.- Parameters:
attributeName
- Attribute name to be parsed.
-
TokensIterator
public TokensIterator(String attributeName, boolean isPrefix)
INTERNAL: Creates an instance of attribute name tokenizer iterator.- Parameters:
attributeName
- Attribute name to be parsed.isPrefix
- Do search for attribute name prefixes ("key."
and"value."
)?
-
-
Method Detail
-
getPrefix
public AttributeNamePrefix getPrefix()
INTERNAL: Get attribute name prefix.- Returns:
- Attribute name prefix.
-
hasNext
public boolean hasNext()
INTERNAL: Returnstrue
if the iteration has more elements. In other words, returnstrue
ifnext()
would return an element rather than throwing an exception.
-
next
public String next()
INTERNAL: Return the next attribute name token from attribute name.- Specified by:
next
in interfaceIterator<String>
- Returns:
- The next attribute name token.
- Throws:
NoSuchElementException
- when attribute name has no more tokens.
-
remove
public void remove()
INTERNAL: Removal of attribute name tokens makes no sense.- Specified by:
remove
in interfaceIterator<String>
- Throws:
UnsupportedOperationException
- is always thrown on invocation.
-
-