Package parser
Class LISTS
java.lang.Object
parser.LISTS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
createStringFrom
(List<String> list, int start, int end) static List
cutPortionOfList
(List list, int start, int end) static int
firstoccurrenceOfStatsOrLogOrAntilogBehind
(int start, List<String> list) static int
firstoccurrenceOfStatsOrLogOrAntilogBeyond
(int start, List<String> list) static void
static int
nextIndexOf
(List list, int start, Object sought) static int
nextIndexOfComma
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a Comma String object from the point where the search commences.static int
nextIndexOfInBetweenOperatorOrComma
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of an In Between Operator from the point where the search commences.static int
nextIndexOfListReturningStatsOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a ListTypeStats Operator from the point where the search commences.static int
nextIndexOfLogicOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a Logic Operator from the point where the search commences.static int
nextIndexOfLogOrAntiLogToAnyBase
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a LogOrAntiLogToAnyBase Operator from the point where the search commences.static int
nextIndexOfMulOrDivOrRem
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a * or / or % operator from the point where the search commences.static int
nextIndexOfNumberReturningStatsOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a Number Type Stats Operator from the point where the search commences.static int
nextIndexOfOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a Operator from the point where the search commences.static int
nextIndexOfPermOrCombOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a permutation or combination operator from the point where the search commences.static int
nextIndexOfPostNumberOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a Post Number Operator from the point where the search commences.static int
nextIndexOfPowerOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a power operator from the point where the search commences.static int
nextIndexOfPreNumberOperator
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a Pre Number Operator from the point where the search commences.static int
nextIndexOfVariable
(List<String> list, int start) Searches a List of String objects forwards for the first occurrence of a Variable String from the point where the search commences.static int
prevIndexOf
(List list, int start, Object sought) static int
prevIndexOfComma
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a Comma String Object from the point where the search commences.static int
prevIndexOfInBetweenOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of an In Between Operator from the point where the search commences.static int
prevIndexOfListReturningStatsOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a ListReturningStatsOperator from the point where the search commences.static int
prevIndexOfLogicOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a Logic Operator from the point where the search commences.static int
prevIndexOfLogOrAntiLogToAnyBase
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a LogOrAntiLogToAnyBase Operator from the point where the search commences.static int
prevIndexOfMulOrDivOrRem
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a * or / or % operator from the point where the search commences.static int
prevIndexOfNumberReturningStatsOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a NumberReturningStatsOperator from the point where the search commences.static int
prevIndexOfOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a Operator from the point where the search commences.static int
prevIndexOfPermOrCombOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a permutation or combination operator from the point where the search commences.static int
prevIndexOfPostNumberOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a Post Number Operator from the point where the search commences.static int
prevIndexOfPowerOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a power operator from the point where the search commences.static int
prevIndexOfPreNumberOperator
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a Pre-Number Operator from the point where the search commences.static int
prevIndexOfVariable
(List<String> list, int start) Searches a List of String objects backwards for the first occurrence of a Variable String from the point where the search commences.
-
Constructor Details
-
LISTS
public LISTS()
-
-
Method Details
-
firstoccurrenceOfStatsOrLogOrAntilogBehind
- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search backwards for the first occurrence of a string that represents a statistical operator( e.g sum(,sort(,med(,st_err( e.t.c ) or a logtoanybase operator e.g log(a,b) where a and b are numbers or an antilogtoanybaseoperator that index itself been not included- Returns:
- the index of the first occurrence of the object behind index start or -1 if the object is not found.
-
firstoccurrenceOfStatsOrLogOrAntilogBeyond
- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the first occurrence of a string that represents a statistical operator( e.g sum(,sort(,med(,st_err( e.t.c ) or a logtoanybase operator e.g log(a,b) where a and b are numbers or an antilogtoanybaseoperator that index itself been not included- Returns:
- the index of the first occurrence of the object beyond index start or -1 if the object is not found.
-
prevIndexOf
- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search backwards for the object that index itself been not includedsought
- the object that we seek- Returns:
- the index of the first occurrence of the object behind index start or -1 if the object is not found.
-
nextIndexOf
- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index included. So if the search item is found at thestart
, the search returns instantly.sought
- the object that we seek- Returns:
- the index of the first occurrence of the object after start or -1 if the object is not found.
-
nextIndexOfMulOrDivOrRem
Searches a List of String objects forwards for the first occurrence of a * or / or % operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfMulOrDivOrRem
Searches a List of String objects backwards for the first occurrence of a * or / or % operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfPowerOperator
Searches a List of String objects forwards for the first occurrence of a power operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfPowerOperator
Searches a List of String objects backwards for the first occurrence of a power operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfVariable
Searches a List of String objects forwards for the first occurrence of a Variable String from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfVariable
Searches a List of String objects backwards for the first occurrence of a Variable String from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfPermOrCombOperator
Searches a List of String objects forwards for the first occurrence of a permutation or combination operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfPermOrCombOperator
Searches a List of String objects backwards for the first occurrence of a permutation or combination operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfInBetweenOperatorOrComma
Searches a List of String objects forwards for the first occurrence of an In Between Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfInBetweenOperator
Searches a List of String objects backwards for the first occurrence of an In Between Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfPreNumberOperator
Searches a List of String objects forwards for the first occurrence of a Pre Number Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfPreNumberOperator
Searches a List of String objects backwards for the first occurrence of a Pre-Number Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfPostNumberOperator
Searches a List of String objects forwards for the first occurrence of a Post Number Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfPostNumberOperator
Searches a List of String objects backwards for the first occurrence of a Post Number Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfNumberReturningStatsOperator
Searches a List of String objects forwards for the first occurrence of a Number Type Stats Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfNumberReturningStatsOperator
Searches a List of String objects backwards for the first occurrence of a NumberReturningStatsOperator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfListReturningStatsOperator
Searches a List of String objects forwards for the first occurrence of a ListTypeStats Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfListReturningStatsOperator
Searches a List of String objects backwards for the first occurrence of a ListReturningStatsOperator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfLogOrAntiLogToAnyBase
Searches a List of String objects forwards for the first occurrence of a LogOrAntiLogToAnyBase Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfLogOrAntiLogToAnyBase
Searches a List of String objects backwards for the first occurrence of a LogOrAntiLogToAnyBase Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfLogicOperator
Searches a List of String objects forwards for the first occurrence of a Logic Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfLogicOperator
Searches a List of String objects backwards for the first occurrence of a Logic Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfComma
Searches a List of String objects forwards for the first occurrence of a Comma String object from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
prevIndexOfComma
Searches a List of String objects backwards for the first occurrence of a Comma String Object from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
nextIndexOfOperator
Searches a List of String objects forwards for the first occurrence of a Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
createStringFrom
- Parameters:
list
- The List from which the copy is to be donestart
- The index to start the copy fromend
- The index where the copy is to end(excluded).- Returns:
- a String that contains the concatenation of all items between index start and index end(excluded.) of the List.
-
prevIndexOfOperator
Searches a List of String objects backwards for the first occurrence of a Operator from the point where the search commences.- Parameters:
list
- the collection of objects that the search is to be carried out onstart
- the starting index of the search from where we search forwards for the object that index itself been not included- Returns:
- the index of the first occurrence of the String object after start or -1 if the object is not found.
-
cutPortionOfList
- Parameters:
list
- the collection of objects that we wish to modifystart
- the index at which we start removing items from the list(start inclusive)end
- the index at which we stop removing items (end exclusive)- Returns:
- the list without all elements between start(start inclusive) and end(not inclusive) e.g for list L=[0,1,2,3,4,5,6,7,8,9],cutPortionOfList( L,6,8) = [0,1,2,3,4,5,8,9]
-
main
-