public class StringX extends ExprImpl implements IStringX
IStringX
,
Serialized FormASTID, BLANKID, COMPLEXID, DOUBLECOMPLEXID, DOUBLEID, FRACTIONID, INTEGERID, METHODSYMBOLID, PATTERNID, STRINGID, SYMBOLID
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(IVisitor<T> visitor)
Accept a visitor with return type T
|
boolean |
accept(IVisitorBoolean visitor)
Accept a visitor with return type
boolean |
int |
accept(IVisitorInt visitor)
Accept a visitor with return type
int |
long |
accept(IVisitorLong visitor)
Accept a visitor with return type
long |
char |
charAt(int index) |
int |
compareTo(IExpr expr)
Compares this expression with the specified expression for order.
|
int |
compareTo(StringX anotherString) |
int |
compareToIgnoreCase(StringX str) |
java.lang.String |
concat(StringX str) |
boolean |
contentEquals(java.lang.StringBuffer sb) |
static StringX |
copyValueOf(char[] data) |
static StringX |
copyValueOf(char[] data,
int offset,
int count) |
boolean |
endsWith(java.lang.String suffix) |
boolean |
equals(java.lang.Object obj)
Test if this is equal to b.
|
boolean |
equalsIgnoreCase(java.lang.String anotherString) |
java.lang.String |
fullFormString()
Return the
FullForm() of this expression |
byte[] |
getBytes() |
byte[] |
getBytes(java.lang.String charsetName) |
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin) |
int |
hashCode()
Hashcode of this Element.
|
ISymbol |
head()
If this object is an instance of
IAST get the first element
(offset 0) of the IAST list (i.e. get(0) ). |
int |
hierarchy()
A unique integer ID for the implementation of this expression
|
int |
indexOf(int ch) |
int |
indexOf(int ch,
int fromIndex) |
int |
indexOf(java.lang.String str) |
int |
indexOf(java.lang.String str,
int fromIndex) |
java.lang.String |
intern() |
java.lang.String |
internalFormString(boolean symbolsAsFactoryMethod,
int depth)
Return the internal Java form of this expression.
|
int |
lastIndexOf(int ch) |
int |
lastIndexOf(int ch,
int fromIndex) |
int |
lastIndexOf(java.lang.String str) |
int |
lastIndexOf(java.lang.String str,
int fromIndex) |
int |
length() |
boolean |
matches(java.lang.String regex) |
protected static StringX |
newInstance(java.lang.String value)
Be cautious with this method, no new internal String object is created
|
boolean |
regionMatches(boolean ignoreCase,
int toffset,
java.lang.String other,
int ooffset,
int len) |
boolean |
regionMatches(int toffset,
java.lang.String other,
int ooffset,
int len) |
java.lang.String |
replace(char oldChar,
char newChar) |
java.lang.String |
replaceFirst(java.lang.String regex,
java.lang.String replacement) |
java.lang.String[] |
split(java.lang.String regex) |
java.lang.String[] |
split(java.lang.String regex,
int limit) |
boolean |
startsWith(java.lang.String prefix) |
boolean |
startsWith(java.lang.String prefix,
int toffset) |
java.lang.CharSequence |
subSequence(int start,
int end) |
java.lang.String |
substring(int beginIndex) |
java.lang.String |
substring(int beginIndex,
int endIndex) |
char[] |
toCharArray() |
java.lang.String |
toLowerCase() |
java.lang.String |
toLowerCase(java.util.Locale locale) |
java.lang.String |
toString() |
java.lang.String |
toUpperCase() |
java.lang.String |
toUpperCase(java.util.Locale locale) |
java.lang.String |
trim() |
static StringX |
valueOf(boolean b) |
static StringX |
valueOf(char c) |
static StringX |
valueOf(char[] data) |
static StringX |
valueOf(char[] data,
int offset,
int count) |
static StringX |
valueOf(double d) |
static StringX |
valueOf(float f) |
static StringX |
valueOf(int i) |
static StringX |
valueOf(long l) |
static StringX |
valueOf(java.lang.Object obj) |
static StringX |
valueOf(java.lang.StringBuffer stringBuffer) |
$div, $minus, $plus, $times, $up, abs, and, apply, apply, asType, conjugate, copy, dec, divide, egcd, evalComplex, evalDouble, evalNumber, evalSignedNumber, factory, gcd, getAt, inc, internalJavaString, internalScalaString, inverse, leafCount, leaves, minus, mod, multiply, negate, negative, opposite, optional, or, plus, power, power, remainder, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceRepeated, replaceSlots, signum, subtract, sum, times, topHead, toScript, toScriptFactory, variables2Slots
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
$div, $minus, $plus, $times, $up, and, apply, apply, asType, dec, divide, evalComplex, evalDouble, evalNumber, evalSignedNumber, evaluate, evaluateHead, getAt, getField, ifPresent, inc, internalJavaString, internalScalaString, inverse, isAllExpanded, isAnd, isArcCos, isArcCosh, isArcSin, isArcSinh, isArcTan, isArcTanh, isAST, isAST, isAST, isAST, isAST, isAST, isAST, isASTSizeGE, isAtom, isBlank, isComplex, isComplexInfinity, isComplexNumeric, isCondition, isConstant, isCos, isCosh, isDerivative, isDirectedInfinity, isE, isExpanded, isFalse, isFlatAST, isFraction, isFree, isFree, isFree, isFreeAST, isFreeAST, isFreeOfPatterns, isFunction, isGEOrdered, isGTOrdered, isIndeterminate, isInfinity, isInteger, isIntegerResult, isLEOrdered, isList, isListOfLists, isLog, isLTOrdered, isMatrix, isMember, isMember, isMinusOne, isModule, isNegative, isNegativeInfinity, isNegativeResult, isNonNegativeResult, isNot, isNumber, isNumEqualInteger, isNumEqualRational, isNumeric, isNumericFunction, isNumericMode, isNumIntValue, isOne, isONE, isOr, isOrderlessAST, isPattern, isPatternDefault, isPatternExpr, isPatternSequence, isPi, isPlus, isPlusTimesPower, isPolynomial, isPolynomial, isPolynomialOfMaxDegree, isPositive, isPositiveResult, isPower, isPresent, isRational, isRationalResult, isRationalValue, isRealResult, isRuleAST, isSame, isSame, isSequence, isSignedNumber, isSin, isSinh, isSlot, isSlotSequence, isSpan, isSymbol, isTan, isTanh, isTimes, isTrue, isUnit, isValue, isVariable, isVector, isZero, isZERO, leafCount, leaves, minus, mod, multiply, multiply, negative, ofNullable, opposite, optional, or, orElse, orElseGet, orElseThrow, plus, power, power, reciprocal, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceSlots, signum, subtract, sum, times, timesDistributed, topHead, variables2Slots
protected static StringX newInstance(java.lang.String value)
numerator
- public static StringX copyValueOf(char[] data)
data
- public static StringX copyValueOf(char[] data, int offset, int count)
data
- offset
- count
- public static StringX valueOf(boolean b)
b
- public static StringX valueOf(char c)
c
- public static StringX valueOf(char[] data)
data
- public static StringX valueOf(char[] data, int offset, int count)
data
- offset
- count
- public static StringX valueOf(double d)
d
- public static StringX valueOf(float f)
f
- public static StringX valueOf(int i)
i
- public static StringX valueOf(long l)
l
- public static StringX valueOf(java.lang.Object obj)
obj
- public static StringX valueOf(java.lang.StringBuffer stringBuffer)
public char charAt(int index)
index
- public int compareTo(IExpr expr)
public int compareTo(StringX anotherString)
anotherString
- public int compareToIgnoreCase(StringX str)
str
- public java.lang.String concat(StringX str)
str
- public boolean contentEquals(java.lang.StringBuffer sb)
sb
- public boolean endsWith(java.lang.String suffix)
suffix
- public boolean equals(java.lang.Object obj)
edu.jas.structure.Element
equals
in interface edu.jas.structure.Element<IExpr>
equals
in class java.lang.Object
public boolean equalsIgnoreCase(java.lang.String anotherString)
anotherString
- public java.lang.String fullFormString()
FullForm()
of this expressionfullFormString
in interface IExpr
fullFormString
in class ExprImpl
public byte[] getBytes()
public byte[] getBytes(java.lang.String charsetName) throws java.io.UnsupportedEncodingException
charsetName
- java.io.UnsupportedEncodingException
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
srcBegin
- srcEnd
- dst
- dstBegin
- public int hashCode()
edu.jas.structure.Element
hashCode
in interface edu.jas.structure.Element<IExpr>
hashCode
in class java.lang.Object
public int hierarchy()
IExpr
public int indexOf(int ch)
ch
- public int indexOf(int ch, int fromIndex)
ch
- fromIndex
- public int indexOf(java.lang.String str)
str
- public int indexOf(java.lang.String str, int fromIndex)
str
- fromIndex
- public java.lang.String intern()
public java.lang.String internalFormString(boolean symbolsAsFactoryMethod, int depth)
ExprImpl
internalFormString
in interface IExpr
internalFormString
in class ExprImpl
symbolsAsFactoryMethod
- if true
use the F.symbol()
method,
otherwise print the symbol name.depth
- the recursion depth of this call. 0
indicates
"recurse without a limit".public int lastIndexOf(int ch)
ch
- public int lastIndexOf(int ch, int fromIndex)
ch
- fromIndex
- public int lastIndexOf(java.lang.String str)
str
- public int lastIndexOf(java.lang.String str, int fromIndex)
str
- fromIndex
- public int length()
public boolean matches(java.lang.String regex)
public boolean regionMatches(boolean ignoreCase, int toffset, java.lang.String other, int ooffset, int len)
public boolean regionMatches(int toffset, java.lang.String other, int ooffset, int len)
public java.lang.String replace(char oldChar, char newChar)
public java.lang.String replaceFirst(java.lang.String regex, java.lang.String replacement)
public java.lang.String[] split(java.lang.String regex)
public java.lang.String[] split(java.lang.String regex, int limit)
public boolean startsWith(java.lang.String prefix)
prefix
- public boolean startsWith(java.lang.String prefix, int toffset)
prefix
- toffset
- public java.lang.CharSequence subSequence(int start, int end)
start
- end
- public java.lang.String substring(int beginIndex)
beginIndex
- public java.lang.String substring(int beginIndex, int endIndex)
beginIndex
- endIndex
- public char[] toCharArray()
public java.lang.String toLowerCase()
public java.lang.String toLowerCase(java.util.Locale locale)
locale
- public java.lang.String toUpperCase()
public java.lang.String toUpperCase(java.util.Locale locale)
locale
- public java.lang.String trim()
public ISymbol head()
ExprImpl
IAST
get the first element
(offset 0) of the IAST
list (i.e. get(0) ).public java.lang.String toString()
toString
in class java.lang.Object
public <T> T accept(IVisitor<T> visitor)
public boolean accept(IVisitorBoolean visitor)
boolean
public int accept(IVisitorInt visitor)
int
public long accept(IVisitorLong visitor)
long