Package com.attivio.sdk.search.fields
Class SubString
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.UnaryFieldExpression
-
- com.attivio.sdk.search.fields.SubString
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class SubString extends UnaryFieldExpression
Substring field expression.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
expression
-
Fields inherited from class com.attivio.sdk.search.fields.FieldExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description SubString(FieldExpression expression, int offset, int length)
SubString(java.lang.String fieldName, int offset, int length)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SubString
clone()
protected SubString
clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.boolean
equals(java.lang.Object other)
int
getLength()
Get the max length of the substring.int
getOffset()
Get the offset for the start of the substring.SchemaField.Type
getType(Schema schema)
Resolve the type for this expression.int
hashCode()
void
setLength(int value)
Set the max length of the substring.void
setOffset(int value)
Set the offset for the start of the substring.protected void
toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.static SubString
valueOf(StringParser reader)
-
Methods inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
forEachField, getExpression, getFieldName, hasChildren, isConstant, rewrite, setExpression
-
Methods inherited from class com.attivio.sdk.search.fields.FieldExpression
apply, copyOf, forEachPhrase, forEachQuery, getDefaultName, isConstant, parse, quote, rewrite, rewriteChildren, toString, toString, valueOf
-
-
-
-
Constructor Detail
-
SubString
public SubString(java.lang.String fieldName, int offset, int length)
-
SubString
public SubString(FieldExpression expression, int offset, int length)
-
-
Method Detail
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getType
in classFieldExpression
-
getOffset
public int getOffset()
Get the offset for the start of the substring.If offset is negative, the actual start offset will be computed on a per value basis to be valueLength + offset. For example, setting the offset to -4 and the length to 4 will extract the last for characters of each value.
-
setOffset
public void setOffset(int value)
Set the offset for the start of the substring.
-
getLength
public int getLength()
Get the max length of the substring.
-
setLength
public void setLength(int value)
Set the max length of the substring.
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.- Specified by:
toString
in classFieldExpression
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classUnaryFieldExpression
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classUnaryFieldExpression
-
clone
public SubString clone()
- Overrides:
clone
in classUnaryFieldExpression
-
clone
protected SubString clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.- Overrides:
clone
in classUnaryFieldExpression
-
valueOf
public static SubString valueOf(StringParser reader)
-
-