Class AttributeNameTokenizer.TokensIterator
- java.lang.Object
-
- org.eclipse.persistence.internal.mappings.converters.AttributeNameTokenizer.TokensIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.lang.String>
- Enclosing class:
- AttributeNameTokenizer
public static final class AttributeNameTokenizer.TokensIterator extends java.lang.Object implements java.util.Iterator<java.lang.String>INTERNAL: Attribute name tokenizer parser implemented as anIteratorover individual attribute name tokens.
-
-
Constructor Summary
Constructors Constructor Description TokensIterator(java.lang.String attributeName)INTERNAL: Creates an instance of attribute name tokenizer iterator.TokensIterator(java.lang.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 AttributeNamePrefixgetPrefix()INTERNAL: Get attribute name prefix.booleanhasNext()INTERNAL: Returnstrueif the iteration has more elements.java.lang.Stringnext()INTERNAL: Return the next attribute name token from attribute name.voidremove()INTERNAL: Removal of attribute name tokens makes no sense.
-
-
-
Constructor Detail
-
TokensIterator
public TokensIterator(java.lang.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(java.lang.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: Returnstrueif the iteration has more elements. In other words, returnstrueif {@see #next()} would return an element rather than throwing an exception.- Specified by:
hasNextin interfacejava.util.Iterator<java.lang.String>- Returns:
- Value of
trueif the iteration has more elements orfalseotherwise.
-
next
public java.lang.String next()
INTERNAL: Return the next attribute name token from attribute name.- Specified by:
nextin interfacejava.util.Iterator<java.lang.String>- Returns:
- The next attribute name token.
- Throws:
java.util.NoSuchElementException- when attribute name has no more tokens.
-
remove
public void remove()
INTERNAL: Removal of attribute name tokens makes no sense.- Specified by:
removein interfacejava.util.Iterator<java.lang.String>- Throws:
java.lang.UnsupportedOperationException- is always thrown on invocation.
-
-