Package io.smallrye.config
Class NameIterator
- java.lang.Object
-
- io.smallrye.config.NameIterator
-
public final class NameIterator extends Object
An iterator for property name strings.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_LENGTH
Configuration key maximum allowed length.
-
Constructor Summary
Constructors Constructor Description NameIterator(String name)
NameIterator(String name, boolean startAtEnd)
NameIterator(String name, int pos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendTo(StringBuilder sb)
String
getAllPreviousSegments()
String
getAllPreviousSegmentsWith(String suffix)
String
getName()
int
getNextEnd()
String
getNextSegment()
StringBuilder
getNextSegment(StringBuilder b)
int
getPosition()
Get the cursor position.String
getPreviousSegment()
int
getPreviousStart()
void
goToEnd()
void
goToStart()
boolean
hasNext()
boolean
hasPrevious()
void
next()
void
next(int segments)
boolean
nextSegmentEquals(String other)
boolean
nextSegmentEquals(String other, int offs, int len)
void
previous()
boolean
previousSegmentEquals(String other)
boolean
previousSegmentEquals(String other, int offs, int len)
String
toString()
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
Configuration key maximum allowed length.- See Also:
- Constant Field Values
-
-
Method Detail
-
goToEnd
public void goToEnd()
-
goToStart
public void goToStart()
-
getPosition
public int getPosition()
Get the cursor position. It will be-1
if the cursor is at the beginning of the string, orname.length()
if it is at the end.- Returns:
- the cursor position
-
getPreviousStart
public int getPreviousStart()
-
getNextEnd
public int getNextEnd()
-
nextSegmentEquals
public boolean nextSegmentEquals(String other)
-
nextSegmentEquals
public boolean nextSegmentEquals(String other, int offs, int len)
-
getNextSegment
public String getNextSegment()
-
getNextSegment
public StringBuilder getNextSegment(StringBuilder b)
-
previousSegmentEquals
public boolean previousSegmentEquals(String other)
-
previousSegmentEquals
public boolean previousSegmentEquals(String other, int offs, int len)
-
getPreviousSegment
public String getPreviousSegment()
-
getAllPreviousSegments
public String getAllPreviousSegments()
-
hasNext
public boolean hasNext()
-
hasPrevious
public boolean hasPrevious()
-
next
public void next()
-
next
public void next(int segments)
-
previous
public void previous()
-
getName
public String getName()
-
appendTo
public void appendTo(StringBuilder sb)
-
-