class Segment extends Object implements Comparable
Modifier and Type | Class and Description |
---|---|
static class |
Segment.Status |
Modifier and Type | Field and Description |
---|---|
(package private) int |
counter |
private Segment[] |
divisions |
private String |
original |
private Segment |
previous |
private StringBuilder |
sb |
(package private) Segment.Status |
stat |
private boolean |
toggle |
Modifier and Type | Method and Description |
---|---|
private boolean |
allStringState() |
private StringBuilder |
append(StringBuilder sb) |
int |
compareTo(Object o) |
void |
divideAndReplace(String START_MARK,
String END_MARK,
String regex,
Properties p)
Segments the current String by find Properties between the START_MARK and
END_MARK and replacing them with their values, splitting them into separate
Strings (that remain encapsulated in the Segment) if regex is non null.
|
boolean |
hasNext() |
String |
next()
Must only be called on the last segment in the Set after sorting.
|
private int |
sequenceNumber() |
private void |
split(String regex)
Same as String.split(String regex) except that it stores the result
internally.
|
Segment.Status |
status() |
private void |
status(Segment.Status status) |
String |
toString() |
private Segment previous
private Segment[] divisions
private String original
int counter
Segment.Status stat
private StringBuilder sb
private boolean toggle
public Segment.Status status()
public boolean hasNext()
private boolean allStringState()
public String next()
private StringBuilder append(StringBuilder sb)
private int sequenceNumber()
public int compareTo(Object o)
compareTo
in interface Comparable
public void divideAndReplace(String START_MARK, String END_MARK, String regex, Properties p) throws PolicyUtils.ExpansionFailedException
START_MARK
- END_MARK
- regex
- p
- PolicyUtils.ExpansionFailedException
private void split(String regex)
private void status(Segment.Status status)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.