public class NameElementRange extends DerivePath
Path
from a sub-range of the name-elements of the Path
.
The name-elements are a split of the Path
by the directory-separator. See the Path
Javadoc.
All indices begin at 0 (for the first element), and can also accept negative-indices which count backwards from the end.
e.g. -1 is the last element; -2 is the second-last element.
Constructor and Description |
---|
NameElementRange() |
Modifier and Type | Method and Description |
---|---|
void |
checkMisconfigured(BeanInstanceMap defaultInstances)
Checks that a bean's properties conform to expectations.
|
Path |
deriveFrom(Path source,
boolean debugMode)
Derives a new path from an existing path.
|
int |
getIndexEnd()
The index of the last element (inclusive) for the range.
|
int |
getIndexStart()
The index of the first element (inclusive) for the range.
|
void |
setIndexEnd(int indexEnd)
The index of the last element (inclusive) for the range.
|
void |
setIndexStart(int indexStart)
The index of the first element (inclusive) for the range.
|
deriveFrom
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
AnchorBean
checkMisconfigured
in class AnchorBean<DerivePath>
defaultInstances
- all available default instances if the DefaultInstance
annotation is usedBeanMisconfiguredException
- if the bean has not been configured properly as XMLpublic Path deriveFrom(Path source, boolean debugMode) throws DerivePathException
DerivePath
deriveFrom
in class DerivePath
source
- the path to derive from.debugMode
- true if debug-mode is activatedDerivePathException
- if anything goes wrongpublic int getIndexStart()
Zero-indexed. It can be negative, in which it counts backwards from the end. See class description.
public void setIndexStart(int indexStart)
Zero-indexed. It can be negative, in which it counts backwards from the end. See class description.
public int getIndexEnd()
Zero-indexed. It can be negative, in which it counts backwards from the end. See class description.
public void setIndexEnd(int indexEnd)
Zero-indexed. It can be negative, in which it counts backwards from the end. See class description.
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.