Package com.e1c.langtool.collector
Interface FeatureKey
- All Superinterfaces:
Comparable<FeatureKey>,Serializable
- All Known Implementing Classes:
SegmentFeatureKey
Feature key is universal segmented path identifies the feature in child objects.
All clients must use default implementation
SegmentFeatureKey.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionappend(FeatureKey relativeFeatureKey) Append.Append.intCompare toFeatureKeywith ignore case of segments.Gets the first segment.getId()Gets the id representing default serializing of the object to string.Gets the last segment.getSegment(int index) Gets the segment.intGets the segment count.Gets the segments.booleanisEmpty()Checks if the key is empty, means that segments are empty.skipFirst(int skipCount) Skip first.skipLast(int skipCount) Skip last segmentsbooleanstartsWith(FeatureKey prefix) Starts with.booleanstartsWithIgnoreCase(FeatureKey prefix) Starts with ignore case.To lower case.To upper case.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getId
String getId()Gets the id representing default serializing of the object to string.- Returns:
- the id
-
getSegments
Gets the segments.- Returns:
- the segments
-
isEmpty
boolean isEmpty()Checks if the key is empty, means that segments are empty.- Returns:
- true, if is empty
-
getSegmentCount
int getSegmentCount()Gets the segment count.- Returns:
- the segment count
-
getSegment
Gets the segment.- Parameters:
index- the index- Returns:
- the segment
-
getLastSegment
String getLastSegment()Gets the last segment.- Returns:
- the last segment
-
getFirstSegment
String getFirstSegment()Gets the first segment.- Returns:
- the first segment
-
append
Append.- Parameters:
segment- the segment- Returns:
- the new feature key
-
append
Append.- Parameters:
relativeFeatureKey- the relative feature key- Returns:
- the new feature key
-
skipFirst
Skip first.- Parameters:
skipCount- the skip count- Returns:
- the new feature key
-
skipLast
Skip last segments- Parameters:
skipCount- the skip count- Returns:
- the new feature key
-
startsWith
Starts with.- Parameters:
prefix- the prefix- Returns:
- true, if successful
-
startsWithIgnoreCase
Starts with ignore case.- Parameters:
prefix- the prefix- Returns:
- true, if successful
-
toLowerCase
FeatureKey toLowerCase()To lower case.- Returns:
- the new feature key
-
toUpperCase
FeatureKey toUpperCase()To upper case.- Returns:
- the new feature key
-
compareToIgnoreCase
Compare toFeatureKeywith ignore case of segments.- Parameters:
key- the key to compare- Returns:
- the result
-