Class Quant
- Object
-
- Quant
-
public final class Quant extends Object
The Quant library provides routines that operate on arrays and collections.These routines are used by the Java family of output formats. This allows invariants to be output as snippets of executable (Java) code. For example, an invariant like
a[] elements ≥ 1
is output (in the Java, JML, and DBC formats) as something likedaikon.Quant.eltsGTE(a, 1)
Naming
The library methods have names of the following forms, where OP indicates an operation: Equal, NotEqual, GT (greater than), GTE (greater than or equal to), LT, LTE.- pairwiseOP. Apply OP to corresponding elements of two arrays: a[0] OP b[0], a[1] OP b[1], etc.
- eltsOP. Apply OP to each element of one array, and a scalar: a[0] OP x, a[1] OP x, etc.
- eltwiseOP: Apply OP to adjacent elements of one array: a[0] OP a[1], a[1] OP a[2], etc.
- lexOP: Determine lexical ordering: compare two arrays pairwise, stopping as soon as the result is known.
- eltsOPindex: Apply op to array elements and their indices: a[0] OP 0, a[1] OP 1, etc.
Equality semantics
Whenever a method involves comparing two elements for equality, this is always "==" equality (even for Objects and Strings).
No exceptions thrown
The library strives not to throw exceptions, even if illegal arguments are passed to the routines. This has two consequences.
First, each predicate (boolean method) returns false when invoked on an illegal argument such as a null collection (array or Collection).
Second, each accessor method returns a default "bad" value if inovked on an illegal argument. For example, the default value for the double type is Double.NaN.
The rationale for the decision to never throw exceptions is that we wish to be able to invoke the Quant methods at run time without distrubing execution of a program, and without forcing clients to write a try .. catch block around each invocation.
A downside of the decision is that if the default value is returned, it may be impossible for a client to determine whether the method really returned that value, or whether the invocation involved an illegal argument. To avoid this problem, it is generally better to use a Quant library predicate rather than returning a value and then testing it externally.
-
-
Field Summary
Fields Modifier and Type Field Description static FuzzyFloat
fuzzy
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean @Nullable []
collectboolean(@Nullable Object object, @Nullable String fieldStr)
collectboolean accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static boolean
collectboolean_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static byte @Nullable []
collectbyte(@Nullable Object object, @Nullable String fieldStr)
collectbyte accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static byte
collectbyte_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static char @Nullable []
collectchar(@Nullable Object object, @Nullable String fieldStr)
collectchar accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static char
collectchar_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static double @Nullable []
collectdouble(@Nullable Object object, @Nullable String fieldStr)
collectdouble accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static double
collectdouble_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static float @Nullable []
collectfloat(@Nullable Object object, @Nullable String fieldStr)
collectfloat accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static float
collectfloat_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static int @Nullable []
collectint(@Nullable Object object, @Nullable String fieldStr)
collectint accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static int
collectint_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static long @Nullable []
collectlong(@Nullable Object object, @Nullable String fieldStr)
collectlong accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static long
collectlong_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static Object @Nullable []
collectObject(@Nullable Object object, @Nullable String fieldStr)
collectObject accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static @Nullable Object
collectObject_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static short @Nullable []
collectshort(@Nullable Object object, @Nullable String fieldStr)
collectshort accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static short
collectshort_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static String @Nullable []
collectString(@Nullable Object object, @Nullable String fieldStr)
collectString accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.static @Nullable String
collectString_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'.static boolean @PolyNull []
concat(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static byte @PolyNull []
concat(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static int @PolyNull []
concat(byte @PolyNull [] seq1, int @PolyNull [] seq2)
static char @PolyNull []
concat(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static double @PolyNull []
concat(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static double @PolyNull []
concat(double @PolyNull [] seq1, float @PolyNull [] seq2)
static double @PolyNull []
concat(float @PolyNull [] seq1, double @PolyNull [] seq2)
static float @PolyNull []
concat(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static int @PolyNull []
concat(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static long @PolyNull []
concat(int @PolyNull [] seq1, long @PolyNull [] seq2)
static long @PolyNull []
concat(long @PolyNull [] seq1, int @PolyNull [] seq2)
static long @PolyNull []
concat(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static short @PolyNull []
concat(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static @Interned Object @PolyNull []
concat(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static @Interned String @PolyNull []
concat(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .static Object @PolyNull []
concat(@PolyNull Object seq1, @PolyNull Object seq2)
static boolean
eltsEqual(boolean @Nullable [] arr, boolean elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(byte @Nullable [] arr, byte elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(byte @Nullable [] arr, int elt)
static boolean
eltsEqual(char @Nullable [] arr, char elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(double @Nullable [] arr, double elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(double @Nullable [] arr, float elt)
static boolean
eltsEqual(float @Nullable [] arr, double elt)
static boolean
eltsEqual(float @Nullable [] arr, float elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(int @Nullable [] arr, int elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(int @Nullable [] arr, long elt)
static boolean
eltsEqual(long @Nullable [] arr, int elt)
static boolean
eltsEqual(long @Nullable [] arr, long elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(short @Nullable [] arr, short elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(@Interned Object @Nullable [] arr, @Interned Object elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(@Interned String @Nullable [] arr, @Interned String elt)
True iff all elements in arr equal elt.static boolean
eltsEqual(@Nullable Object arr, Object elt)
static boolean
eltsEqualIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] == i.static boolean
eltsEqualIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] == i.static boolean
eltsEqualIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] == i.static boolean
eltsEqualIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] == i.static boolean
eltsEqualIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] == i.static boolean
eltsEqualIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] == i.static boolean
eltsEqualIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] == i.static boolean
eltsGT(byte @Nullable [] arr, byte elt)
True iff every element in arr is greater than elt.static boolean
eltsGT(byte @Nullable [] arr, int elt)
static boolean
eltsGT(char @Nullable [] arr, char elt)
True iff every element in arr is greater than elt.static boolean
eltsGT(double @Nullable [] arr, double elt)
True iff every element in arr is greater than elt.static boolean
eltsGT(double @Nullable [] arr, float elt)
static boolean
eltsGT(float @Nullable [] arr, double elt)
static boolean
eltsGT(float @Nullable [] arr, float elt)
True iff every element in arr is greater than elt.static boolean
eltsGT(int @Nullable [] arr, int elt)
True iff every element in arr is greater than elt.static boolean
eltsGT(int @Nullable [] arr, long elt)
static boolean
eltsGT(long @Nullable [] arr, int elt)
static boolean
eltsGT(long @Nullable [] arr, long elt)
True iff every element in arr is greater than elt.static boolean
eltsGT(short @Nullable [] arr, short elt)
True iff every element in arr is greater than elt.static boolean
eltsGTE(byte @Nullable [] arr, byte elt)
True iff every element in arr is greater than or equal to elt.static boolean
eltsGTE(byte @Nullable [] arr, int elt)
static boolean
eltsGTE(char @Nullable [] arr, char elt)
True iff every element in arr is greater than or equal to elt.static boolean
eltsGTE(double @Nullable [] arr, double elt)
True iff every element in arr is greater than or equal to elt.static boolean
eltsGTE(double @Nullable [] arr, float elt)
static boolean
eltsGTE(float @Nullable [] arr, double elt)
static boolean
eltsGTE(float @Nullable [] arr, float elt)
True iff every element in arr is greater than or equal to elt.static boolean
eltsGTE(int @Nullable [] arr, int elt)
True iff every element in arr is greater than or equal to elt.static boolean
eltsGTE(int @Nullable [] arr, long elt)
static boolean
eltsGTE(long @Nullable [] arr, int elt)
static boolean
eltsGTE(long @Nullable [] arr, long elt)
True iff every element in arr is greater than or equal to elt.static boolean
eltsGTE(short @Nullable [] arr, short elt)
True iff every element in arr is greater than or equal to elt.static boolean
eltsGteIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i.static boolean
eltsGteIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i.static boolean
eltsGteIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i.static boolean
eltsGteIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i.static boolean
eltsGteIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i.static boolean
eltsGteIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i.static boolean
eltsGteIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i.static boolean
eltsGtIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] > i.static boolean
eltsGtIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] > i.static boolean
eltsGtIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] > i.static boolean
eltsGtIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] > i.static boolean
eltsGtIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] > i.static boolean
eltsGtIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] > i.static boolean
eltsGtIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] > i.static boolean
eltsLT(byte @Nullable [] arr, byte elt)
True iff every element in arr is less than elt.static boolean
eltsLT(byte @Nullable [] arr, int elt)
static boolean
eltsLT(char @Nullable [] arr, char elt)
True iff every element in arr is less than elt.static boolean
eltsLT(double @Nullable [] arr, double elt)
True iff every element in arr is less than elt.static boolean
eltsLT(double @Nullable [] arr, float elt)
static boolean
eltsLT(float @Nullable [] arr, double elt)
static boolean
eltsLT(float @Nullable [] arr, float elt)
True iff every element in arr is less than elt.static boolean
eltsLT(int @Nullable [] arr, int elt)
True iff every element in arr is less than elt.static boolean
eltsLT(int @Nullable [] arr, long elt)
static boolean
eltsLT(long @Nullable [] arr, int elt)
static boolean
eltsLT(long @Nullable [] arr, long elt)
True iff every element in arr is less than elt.static boolean
eltsLT(short @Nullable [] arr, short elt)
True iff every element in arr is less than elt.static boolean
eltsLTE(byte @Nullable [] arr, byte elt)
True iff every element in arr is less than or equal to elt.static boolean
eltsLTE(byte @Nullable [] arr, int elt)
static boolean
eltsLTE(char @Nullable [] arr, char elt)
True iff every element in arr is less than or equal to elt.static boolean
eltsLTE(double @Nullable [] arr, double elt)
True iff every element in arr is less than or equal to elt.static boolean
eltsLTE(double @Nullable [] arr, float elt)
static boolean
eltsLTE(float @Nullable [] arr, double elt)
static boolean
eltsLTE(float @Nullable [] arr, float elt)
True iff every element in arr is less than or equal to elt.static boolean
eltsLTE(int @Nullable [] arr, int elt)
True iff every element in arr is less than or equal to elt.static boolean
eltsLTE(int @Nullable [] arr, long elt)
static boolean
eltsLTE(long @Nullable [] arr, int elt)
static boolean
eltsLTE(long @Nullable [] arr, long elt)
True iff every element in arr is less than or equal to elt.static boolean
eltsLTE(short @Nullable [] arr, short elt)
True iff every element in arr is less than or equal to elt.static boolean
eltsLteIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i.static boolean
eltsLteIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i.static boolean
eltsLteIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i.static boolean
eltsLteIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i.static boolean
eltsLteIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i.static boolean
eltsLteIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i.static boolean
eltsLteIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i.static boolean
eltsLtIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] < i.static boolean
eltsLtIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] < i.static boolean
eltsLtIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] < i.static boolean
eltsLtIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] < i.static boolean
eltsLtIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] < i.static boolean
eltsLtIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] < i.static boolean
eltsLtIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] < i.static boolean
eltsNonNull(Object[] seq1)
True iff the sequence contains no null elements.static boolean
eltsNotEqual(boolean @Nullable [] arr, boolean elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(byte @Nullable [] arr, byte elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(byte @Nullable [] arr, int elt)
static boolean
eltsNotEqual(char @Nullable [] arr, char elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(double @Nullable [] arr, double elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(double @Nullable [] arr, float elt)
static boolean
eltsNotEqual(float @Nullable [] arr, double elt)
static boolean
eltsNotEqual(float @Nullable [] arr, float elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(int @Nullable [] arr, int elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(int @Nullable [] arr, long elt)
static boolean
eltsNotEqual(long @Nullable [] arr, int elt)
static boolean
eltsNotEqual(long @Nullable [] arr, long elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(short @Nullable [] arr, short elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(@Interned Object @Nullable [] arr, @Interned Object elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(@Interned String @Nullable [] arr, @Interned String elt)
True iff every element in arr does not equal elt.static boolean
eltsNotEqual(@Nullable Object arr, Object elt)
static boolean
eltsNotEqualIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltsNotEqualIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltsNotEqualIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltsNotEqualIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltsNotEqualIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltsNotEqualIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltsNotEqualIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseEqual(boolean @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(char @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(double @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(float @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(int @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(long @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(short @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(@Interned Object @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(@Interned String @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1].static boolean
eltwiseEqual(Object seq)
static boolean
eltwiseGT(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1].static boolean
eltwiseGT(char @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1].static boolean
eltwiseGT(double @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1].static boolean
eltwiseGT(float @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1].static boolean
eltwiseGT(int @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1].static boolean
eltwiseGT(long @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1].static boolean
eltwiseGT(short @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1].static boolean
eltwiseGTE(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1].static boolean
eltwiseGTE(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1].static boolean
eltwiseGTE(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1].static boolean
eltwiseGTE(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1].static boolean
eltwiseGTE(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1].static boolean
eltwiseGTE(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1].static boolean
eltwiseGTE(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1].static boolean
eltwiseLT(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1].static boolean
eltwiseLT(char @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1].static boolean
eltwiseLT(double @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1].static boolean
eltwiseLT(float @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1].static boolean
eltwiseLT(int @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1].static boolean
eltwiseLT(long @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1].static boolean
eltwiseLT(short @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1].static boolean
eltwiseLTE(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1].static boolean
eltwiseLTE(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1].static boolean
eltwiseLTE(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1].static boolean
eltwiseLTE(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1].static boolean
eltwiseLTE(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1].static boolean
eltwiseLTE(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1].static boolean
eltwiseLTE(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1].static boolean
eltwiseNotEqual(boolean @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(char @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(double @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(float @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(int @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(long @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(short @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(@Interned Object @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(@Interned String @Nullable [] seq)
True iff for all applicable i, every seq[i] !static boolean
eltwiseNotEqual(Object seq)
static boolean
getElement_boolean(boolean[] arr, long i)
static boolean
getElement_boolean(Object o, long i)
Returns the ith element of the array or collection argument.static byte
getElement_byte(byte[] arr, long i)
static byte
getElement_byte(Object o, long i)
Returns the ith element of the array or collection argument.static char
getElement_char(char[] arr, long i)
static char
getElement_char(Object o, long i)
Returns the ith element of the array or collection argument.static double
getElement_double(double[] arr, long i)
static double
getElement_double(Object o, long i)
Returns the ith element of the array or collection argument.static float
getElement_float(float[] arr, long i)
static float
getElement_float(Object o, long i)
Returns the ith element of the array or collection argument.static int
getElement_int(int[] arr, long i)
static int
getElement_int(Object o, long i)
Returns the ith element of the array or collection argument.static long
getElement_long(long[] arr, long i)
static long
getElement_long(Object o, long i)
Returns the ith element of the array or collection argument.static @Nullable @Interned Object
getElement_Object(Object[] arr, long i)
static @Nullable @Interned Object
getElement_Object(Object o, long i)
Returns the ith element of the array or collection argument.static short
getElement_short(short[] arr, long i)
static short
getElement_short(Object o, long i)
Returns the ith element of the array or collection argument.static @Nullable @Interned String
getElement_String(Object o, long i)
Returns the ith element of the array or collection argument.static @Nullable @Interned String
getElement_String(String[] arr, long i)
static boolean @PolyNull []
intersection(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static byte @PolyNull []
intersection(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static int @PolyNull []
intersection(byte @PolyNull [] seq1, int @PolyNull [] seq2)
static char @PolyNull []
intersection(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static double @PolyNull []
intersection(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static double @PolyNull []
intersection(double @PolyNull [] seq1, float @PolyNull [] seq2)
static double @PolyNull []
intersection(float @PolyNull [] seq1, double @PolyNull [] seq2)
static float @PolyNull []
intersection(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static int @PolyNull []
intersection(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static long @PolyNull []
intersection(int @PolyNull [] seq1, long @PolyNull [] seq2)
static long @PolyNull []
intersection(long @PolyNull [] seq1, int @PolyNull [] seq2)
static long @PolyNull []
intersection(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static short @PolyNull []
intersection(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static @Interned Object @PolyNull []
intersection(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static @Interned String @PolyNull []
intersection(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2.static Object @PolyNull []
intersection(@PolyNull Object seq1, @PolyNull Object seq2)
static boolean
isIntegralType(@Nullable Class<?> c)
static boolean
isNumericType(Class<?> c)
static boolean
isRealType(@Nullable Class<?> c)
static boolean
isReverse(boolean[] seq1, boolean[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(byte[] seq1, byte[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
isReverse(char[] seq1, char[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(double[] seq1, double[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
isReverse(float[] seq1, float[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
isReverse(int[] seq1, int[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
isReverse(long[] seq1, long[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
isReverse(short[] seq1, short[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(@Interned Object[] seq1, @Interned Object[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(@Interned String[] seq1, @Interned String[] seq2)
True iff seq1 is the reverse of seq2.static boolean
isReverse(@Nullable Object seq1, @Nullable Object seq2)
static boolean
isReverse(@PolyNull Collection<? extends @Interned Object> seq1, @Interned Object @Nullable [] seq2)
static boolean
lexEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexEqual(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
lexEqual(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
lexEqual(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
lexEqual(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexEqual(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2.static boolean
lexEqual(@Nullable Object seq1, @Nullable Object seq2)
static boolean
lexGT(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.static boolean
lexGT(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexGT(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.static boolean
lexGT(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.static boolean
lexGT(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
lexGT(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
lexGT(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.static boolean
lexGT(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.static boolean
lexGT(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
lexGT(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexGT(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.static boolean
lexGT(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.static boolean
lexGTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.static boolean
lexGTE(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexGTE(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.static boolean
lexGTE(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.static boolean
lexGTE(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
lexGTE(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
lexGTE(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.static boolean
lexGTE(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.static boolean
lexGTE(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
lexGTE(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexGTE(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.static boolean
lexGTE(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.static boolean
lexLT(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.static boolean
lexLT(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexLT(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.static boolean
lexLT(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.static boolean
lexLT(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
lexLT(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
lexLT(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.static boolean
lexLT(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.static boolean
lexLT(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
lexLT(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexLT(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.static boolean
lexLT(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.static boolean
lexLTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.static boolean
lexLTE(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexLTE(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.static boolean
lexLTE(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.static boolean
lexLTE(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
lexLTE(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
lexLTE(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.static boolean
lexLTE(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.static boolean
lexLTE(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
lexLTE(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexLTE(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.static boolean
lexLTE(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.static boolean
lexNotEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexNotEqual(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
lexNotEqual(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
lexNotEqual(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
lexNotEqual(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
lexNotEqual(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.static boolean
lexNotEqual(@Nullable Object seq1, @Nullable Object seq2)
static boolean
memberOf(boolean elt, boolean @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(byte elt, byte @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(byte elt, int @Nullable [] arr)
static boolean
memberOf(char elt, char @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(double elt, double @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(double elt, float @Nullable [] arr)
static boolean
memberOf(float elt, double @Nullable [] arr)
static boolean
memberOf(float elt, float @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(int elt, int @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(int elt, long @Nullable [] arr)
static boolean
memberOf(long elt, byte @Nullable [] arr)
static boolean
memberOf(long elt, int @Nullable [] arr)
static boolean
memberOf(long elt, long @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(long elt, short @Nullable [] arr)
static boolean
memberOf(short elt, short @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(@Interned Object elt, @Interned Object @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(@Interned String elt, @Interned String @Nullable [] arr)
Returns true iff elt is in array arr.static boolean
memberOf(Object elt, @Nullable Object arr)
static boolean
noDups(boolean @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(byte @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(char @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(double @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(float @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(int @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(long @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(short @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(@Interned Object @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(@Interned String @Nullable [] seq)
Returns true iff seq contains no duplicate elements.static boolean
noDups(Object seq)
SeenoDups(Object[])
.static boolean
pairwiseBitwiseComplement(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq1[i] == ~ seq2[i].static boolean
pairwiseBitwiseComplement(int[] seq1, long[] seq2)
static boolean
pairwiseBitwiseComplement(long[] seq1, int[] seq2)
static boolean
pairwiseBitwiseComplement(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq1[i] == ~ seq2[i].static boolean
pairwiseBitwiseComplement(Object[] seq1, Object[] seq2)
static boolean
pairwiseBitwiseSubset(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq1[i] == (seq2[i] | seq1[i]).static boolean
pairwiseBitwiseSubset(int[] seq1, long[] seq2)
static boolean
pairwiseBitwiseSubset(long[] seq1, int[] seq2)
static boolean
pairwiseBitwiseSubset(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq1[i] == (seq2[i] | seq1[i]).static boolean
pairwiseBitwiseSubset(Object[] seq1, Object[] seq2)
static boolean
pairwiseDivides(byte[] seq1, byte[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i].static boolean
pairwiseDivides(byte[] seq1, int[] seq2)
static boolean
pairwiseDivides(double[] seq1, double[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i].static boolean
pairwiseDivides(double[] seq1, float[] seq2)
static boolean
pairwiseDivides(float[] seq1, double[] seq2)
static boolean
pairwiseDivides(float[] seq1, float[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i].static boolean
pairwiseDivides(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i].static boolean
pairwiseDivides(int[] seq1, long[] seq2)
static boolean
pairwiseDivides(long[] seq1, int[] seq2)
static boolean
pairwiseDivides(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i].static boolean
pairwiseEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseEqual(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
pairwiseEqual(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
pairwiseEqual(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
pairwiseEqual(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseEqual(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(@Interned Object @Nullable [] seq1, @Nullable AbstractCollection<@Interned Object> seq2)
static boolean
pairwiseEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i].static boolean
pairwiseEqual(@Interned String @Nullable [] seq1, @Nullable AbstractCollection<@Interned String> seq2)
static boolean
pairwiseEqual(@Nullable Object seq1, @Nullable Object seq2)
static boolean
pairwiseEqual(@Nullable AbstractCollection<@Interned Object> seq1, @Interned Object @Nullable [] seq2)
static boolean
pairwiseEqual(@Nullable AbstractCollection<@Interned String> seq1, @Interned String @Nullable [] seq2)
static boolean
pairwiseGT(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i].static boolean
pairwiseGT(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseGT(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i].static boolean
pairwiseGT(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i].static boolean
pairwiseGT(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
pairwiseGT(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
pairwiseGT(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i].static boolean
pairwiseGT(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i].static boolean
pairwiseGT(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
pairwiseGT(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseGT(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i].static boolean
pairwiseGT(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i].static boolean
pairwiseGTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i].static boolean
pairwiseGTE(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseGTE(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i].static boolean
pairwiseGTE(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i].static boolean
pairwiseGTE(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
pairwiseGTE(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
pairwiseGTE(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i].static boolean
pairwiseGTE(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i].static boolean
pairwiseGTE(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
pairwiseGTE(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseGTE(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i].static boolean
pairwiseGTE(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i].static boolean
pairwiseLT(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i].static boolean
pairwiseLT(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseLT(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i].static boolean
pairwiseLT(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i].static boolean
pairwiseLT(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
pairwiseLT(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
pairwiseLT(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i].static boolean
pairwiseLT(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i].static boolean
pairwiseLT(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
pairwiseLT(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseLT(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i].static boolean
pairwiseLT(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i].static boolean
pairwiseLTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i].static boolean
pairwiseLTE(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseLTE(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i].static boolean
pairwiseLTE(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i].static boolean
pairwiseLTE(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
pairwiseLTE(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
pairwiseLTE(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i].static boolean
pairwiseLTE(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i].static boolean
pairwiseLTE(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
pairwiseLTE(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseLTE(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i].static boolean
pairwiseLTE(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i].static boolean
pairwiseNotEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseNotEqual(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
pairwiseNotEqual(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
pairwiseNotEqual(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
pairwiseNotEqual(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
pairwiseNotEqual(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] !static boolean
pairwiseNotEqual(@Nullable Object seq1, @Nullable Object seq2)
static boolean
pairwiseSquare(byte[] seq1, byte[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i].static boolean
pairwiseSquare(byte[] seq1, int[] seq2)
static boolean
pairwiseSquare(double[] seq1, double[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i].static boolean
pairwiseSquare(double[] seq1, float[] seq2)
static boolean
pairwiseSquare(float[] seq1, double[] seq2)
static boolean
pairwiseSquare(float[] seq1, float[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i].static boolean
pairwiseSquare(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i].static boolean
pairwiseSquare(int[] seq1, long[] seq2)
static boolean
pairwiseSquare(long[] seq1, int[] seq2)
static boolean
pairwiseSquare(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i].static boolean
sameLength(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(byte @Nullable [] seq1, int @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(char @Nullable [] seq1, char @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(double @Nullable [] seq1, double @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(double @Nullable [] seq1, float @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(float @Nullable [] seq1, double @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(float @Nullable [] seq1, float @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(int @Nullable [] seq1, int @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(int @Nullable [] seq1, long @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(long @Nullable [] seq1, int @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(long @Nullable [] seq1, long @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(short @Nullable [] seq1, short @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(Object @Nullable [] seq1, Object @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean
sameLength(String @Nullable [] seq1, String @Nullable [] seq2)
True iff both sequences are non-null and have the same length.static boolean @PolyNull []
setDiff(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static byte @PolyNull []
setDiff(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static int @PolyNull []
setDiff(byte @PolyNull [] seq1, int @PolyNull [] seq2)
static char @PolyNull []
setDiff(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static double @PolyNull []
setDiff(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static double @PolyNull []
setDiff(double @PolyNull [] seq1, float @PolyNull [] seq2)
static double @PolyNull []
setDiff(float @PolyNull [] seq1, double @PolyNull [] seq2)
static float @PolyNull []
setDiff(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static int @PolyNull []
setDiff(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static long @PolyNull []
setDiff(int @PolyNull [] seq1, long @PolyNull [] seq2)
static long @PolyNull []
setDiff(long @PolyNull [] seq1, int @PolyNull [] seq2)
static long @PolyNull []
setDiff(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static short @PolyNull []
setDiff(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static @Interned Object @PolyNull []
setDiff(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static @Interned String @PolyNull []
setDiff(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2.static Object @PolyNull []
setDiff(@PolyNull Object seq1, @PolyNull Object seq2)
static boolean
setEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
setEqual(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
setEqual(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
setEqual(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
setEqual(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
setEqual(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.static boolean
setEqual(@Nullable Object seq1, @Nullable Object seq2)
static int
size(Object o)
Returns the size of the array or collection.static int
size(Collection<?> o)
Returns the size of the collection.static boolean @PolyNull []
slice(boolean @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static boolean @PolyNull []
slice(boolean @PolyNull [] seq, int start, long end)
static boolean @PolyNull []
slice(boolean @PolyNull [] seq, long start, int end)
static boolean @PolyNull []
slice(boolean @PolyNull [] seq, long start, long end)
static byte @PolyNull []
slice(byte @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static byte @PolyNull []
slice(byte @PolyNull [] seq, int start, long end)
static byte @PolyNull []
slice(byte @PolyNull [] seq, long start, int end)
static byte @PolyNull []
slice(byte @PolyNull [] seq, long start, long end)
static char @PolyNull []
slice(char @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static char @PolyNull []
slice(char @PolyNull [] seq, int start, long end)
static char @PolyNull []
slice(char @PolyNull [] seq, long start, int end)
static char @PolyNull []
slice(char @PolyNull [] seq, long start, long end)
static double @PolyNull []
slice(double @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static double @PolyNull []
slice(double @PolyNull [] seq, int start, long end)
static double @PolyNull []
slice(double @PolyNull [] seq, long start, int end)
static double @PolyNull []
slice(double @PolyNull [] seq, long start, long end)
static float @PolyNull []
slice(float @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static float @PolyNull []
slice(float @PolyNull [] seq, int start, long end)
static float @PolyNull []
slice(float @PolyNull [] seq, long start, int end)
static float @PolyNull []
slice(float @PolyNull [] seq, long start, long end)
static int @PolyNull []
slice(int @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static int @PolyNull []
slice(int @PolyNull [] seq, int start, long end)
static int @PolyNull []
slice(int @PolyNull [] seq, long start, int end)
static int @PolyNull []
slice(int @PolyNull [] seq, long start, long end)
static long @PolyNull []
slice(long @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static long @PolyNull []
slice(long @PolyNull [] seq, int start, long end)
static long @PolyNull []
slice(long @PolyNull [] seq, long start, int end)
static long @PolyNull []
slice(long @PolyNull [] seq, long start, long end)
static short @PolyNull []
slice(short @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static short @PolyNull []
slice(short @PolyNull [] seq, int start, long end)
static short @PolyNull []
slice(short @PolyNull [] seq, long start, int end)
static short @PolyNull []
slice(short @PolyNull [] seq, long start, long end)
static @Interned Object @PolyNull []
slice(@Interned Object @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static @Interned Object @PolyNull []
slice(@Interned Object @PolyNull [] seq, int start, long end)
static @Interned Object @PolyNull []
slice(@Interned Object @PolyNull [] seq, long start, int end)
static @Interned Object @PolyNull []
slice(@Interned Object @PolyNull [] seq, long start, long end)
static @Interned String @PolyNull []
slice(@Interned String @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].static @Interned String @PolyNull []
slice(@Interned String @PolyNull [] seq, int start, long end)
static @Interned String @PolyNull []
slice(@Interned String @PolyNull [] seq, long start, int end)
static @Interned String @PolyNull []
slice(@Interned String @PolyNull [] seq, long start, long end)
static Object @PolyNull []
slice(@PolyNull Object seq, int start, int end)
static boolean
subsetOf(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(byte @Nullable [] seq1, int @Nullable [] seq2)
static boolean
subsetOf(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(double @Nullable [] seq1, float @Nullable [] seq2)
static boolean
subsetOf(float @Nullable [] seq1, double @Nullable [] seq2)
static boolean
subsetOf(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(int @Nullable [] seq1, long @Nullable [] seq2)
static boolean
subsetOf(long @Nullable [] seq1, int @Nullable [] seq2)
static boolean
subsetOf(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(@Interned Object @Nullable [] seq1, @Nullable Collection<? extends @Interned Object> seq2)
static boolean
subsetOf(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.static boolean
subsetOf(@Nullable Object elts, @Nullable Object arr)
True iff all elements in elts occur once or more in arr; that is, elts is a subset of arr.static boolean
subsetOf(@Nullable Collection<? extends @Interned Object> seq1, @Interned Object @Nullable [] seq2)
static Object @PolyNull []
toObjArray(@PolyNull Object o)
Returns an Object[] array, either by casting or by conversion from an AbstractCollection.static @PolyNull String @PolyNull []
typeArray(@PolyNull @Interned Object @PolyNull [] seq)
Returns an array of Strings, where the strings are the result of invoking x.getClass().toString() for each element x in the array.static String @PolyNull []
typeArray(@PolyNull Object seq)
SeetypeArray(Object[])
.static boolean @PolyNull []
union(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static byte @PolyNull []
union(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static int @PolyNull []
union(byte @PolyNull [] seq1, int @PolyNull [] seq2)
static char @PolyNull []
union(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static double @PolyNull []
union(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static double @PolyNull []
union(double @PolyNull [] seq1, float @PolyNull [] seq2)
static double @PolyNull []
union(float @PolyNull [] seq1, double @PolyNull [] seq2)
static float @PolyNull []
union(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static int @PolyNull []
union(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static long @PolyNull []
union(int @PolyNull [] seq1, long @PolyNull [] seq2)
static long @PolyNull []
union(long @PolyNull [] seq1, int @PolyNull [] seq2)
static long @PolyNull []
union(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static short @PolyNull []
union(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static @Interned Object @PolyNull []
union(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static @Interned String @PolyNull []
union(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2.static Object @PolyNull []
union(@PolyNull Object seq1, @PolyNull Object seq2)
-
-
-
Field Detail
-
fuzzy
public static FuzzyFloat fuzzy
-
-
Method Detail
-
size
@Pure public static int size(Object o)
Returns the size of the array or collection. If the argument is null or not an array or collection, returns a default value (Integer.MAX_VALUE). Thus, for an array a, this never throws an exception, though a.length may.
-
size
@Pure public static int size(Collection<?> o)
Returns the size of the collection. If the argument is null, returns a default value (Integer.MAX_VALUE).
-
eltsNonNull
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNonNull(Object[] seq1)
True iff the sequence contains no null elements.
-
getElement_boolean
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean getElement_boolean(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (false).
-
getElement_boolean
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean getElement_boolean(boolean[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
concat
@SideEffectFree public static boolean @PolyNull [] concat(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
union
@SideEffectFree public static boolean @PolyNull [] union(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static boolean @PolyNull [] intersection(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static boolean @PolyNull [] setDiff(boolean @PolyNull [] seq1, boolean @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(boolean[] seq1, boolean[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(boolean @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(boolean elt, boolean @Nullable [] arr)
Returns true iff elt is in array arr.
-
slice
@Pure public static boolean @PolyNull [] slice(boolean @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static boolean @PolyNull [] slice(boolean @PolyNull [] seq, long start, int end)
-
slice
@Pure public static boolean @PolyNull [] slice(boolean @PolyNull [] seq, int start, long end)
-
slice
@Pure public static boolean @PolyNull [] slice(boolean @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(boolean @Nullable [] arr, boolean elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(boolean @Nullable [] arr, boolean elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(boolean @Nullable [] seq1, boolean @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(boolean @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(boolean @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
collectboolean
@SideEffectFree public static boolean @Nullable [] collectboolean(@Nullable Object object, @Nullable String fieldStr)
collectboolean accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectboolean() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectboolean_field
@SideEffectFree public static boolean collectboolean_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectboolean_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_byte
@Pure public static byte getElement_byte(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (Byte.MAX_VALUE).
-
getElement_byte
@Pure public static byte getElement_byte(byte[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(byte @Nullable [] seq1, int @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(byte[] seq1, byte[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq2[i] divides seq1[i]
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(byte[] seq1, int[] seq2)
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(byte[] seq1, byte[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == seq2[i] * seq2[i]
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(byte[] seq1, int[] seq2)
-
concat
@SideEffectFree public static byte @PolyNull [] concat(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
concat
@SideEffectFree public static int @PolyNull [] concat(byte @PolyNull [] seq1, int @PolyNull [] seq2)
-
union
@SideEffectFree public static byte @PolyNull [] union(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
union
@Pure public static int @PolyNull [] union(byte @PolyNull [] seq1, int @PolyNull [] seq2)
-
intersection
@Pure public static byte @PolyNull [] intersection(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static int @PolyNull [] intersection(byte @PolyNull [] seq1, int @PolyNull [] seq2)
-
setDiff
@Pure public static byte @PolyNull [] setDiff(byte @PolyNull [] seq1, byte @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static int @PolyNull [] setDiff(byte @PolyNull [] seq1, int @PolyNull [] seq2)
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(byte[] seq1, byte[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(byte @Nullable [] seq1, int @Nullable [] seq2)
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(byte @Nullable [] seq1, int @Nullable [] seq2)
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(byte @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(byte elt, byte @Nullable [] arr)
Returns true iff elt is in array arr.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(byte elt, int @Nullable [] arr)
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(long elt, byte @Nullable [] arr)
-
slice
@Pure public static byte @PolyNull [] slice(byte @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static byte @PolyNull [] slice(byte @PolyNull [] seq, long start, int end)
-
slice
@Pure public static byte @PolyNull [] slice(byte @PolyNull [] seq, int start, long end)
-
slice
@Pure public static byte @PolyNull [] slice(byte @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(byte @Nullable [] arr, byte elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(byte @Nullable [] arr, int elt)
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(byte @Nullable [] arr, byte elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(byte @Nullable [] arr, int elt)
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(byte @Nullable [] arr, byte elt)
True iff every element in arr is greater than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] > elt
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(byte @Nullable [] arr, int elt)
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(byte @Nullable [] arr, byte elt)
True iff every element in arr is greater than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≥ elt
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(byte @Nullable [] arr, int elt)
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(byte @Nullable [] arr, byte elt)
True iff every element in arr is less than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] < elt
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(byte @Nullable [] arr, int elt)
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(byte @Nullable [] arr, byte elt)
True iff every element in arr is less than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≤ elt
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(byte @Nullable [] arr, int elt)
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] < seq2[i]
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(byte @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≤ seq2[i]
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(byte @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] > seq2[i]
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(byte @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≥ seq2[i]
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(byte @Nullable [] seq1, int @Nullable [] seq2)
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(byte @Nullable [] seq1, int @Nullable [] seq2)
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(byte @Nullable [] seq1, int @Nullable [] seq2)
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(byte @Nullable [] seq1, int @Nullable [] seq2)
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(byte @Nullable [] seq1, int @Nullable [] seq2)
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(byte @Nullable [] seq1, byte @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(byte @Nullable [] seq1, int @Nullable [] seq2)
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
eltwiseLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLT(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] < seq[i+1]
-
eltwiseLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLTE(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≤ seq[i+1]
-
eltwiseGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGT(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] > seq[i+1]
-
eltwiseGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGTE(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≥ seq[i+1]
-
eltsEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqualIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] == i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] == i
-
eltsNotEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqualIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] != i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] != i
-
eltsLtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLtIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] < i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] < i
-
eltsLteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLteIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≤ i
-
eltsGtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGtIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] > i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] > i
-
eltsGteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGteIndex(byte @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≥ i
-
collectbyte
@SideEffectFree public static byte @Nullable [] collectbyte(@Nullable Object object, @Nullable String fieldStr)
collectbyte accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectbyte() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectbyte_field
@SideEffectFree public static byte collectbyte_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectbyte_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_char
@Pure public static char getElement_char(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (Character.MAX_VALUE).
-
getElement_char
@Pure public static char getElement_char(char[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(char @Nullable [] seq1, char @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
concat
@SideEffectFree public static char @PolyNull [] concat(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
union
@SideEffectFree public static char @PolyNull [] union(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static char @PolyNull [] intersection(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static char @PolyNull [] setDiff(char @PolyNull [] seq1, char @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(char[] seq1, char[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(char @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(char elt, char @Nullable [] arr)
Returns true iff elt is in array arr.
-
slice
@Pure public static char @PolyNull [] slice(char @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static char @PolyNull [] slice(char @PolyNull [] seq, long start, int end)
-
slice
@Pure public static char @PolyNull [] slice(char @PolyNull [] seq, int start, long end)
-
slice
@Pure public static char @PolyNull [] slice(char @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(char @Nullable [] arr, char elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(char @Nullable [] arr, char elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(char @Nullable [] arr, char elt)
True iff every element in arr is greater than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] > elt
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(char @Nullable [] arr, char elt)
True iff every element in arr is greater than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≥ elt
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(char @Nullable [] arr, char elt)
True iff every element in arr is less than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] < elt
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(char @Nullable [] arr, char elt)
True iff every element in arr is less than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≤ elt
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] < seq2[i]
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≤ seq2[i]
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] > seq2[i]
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(char @Nullable [] seq1, char @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≥ seq2[i]
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(char @Nullable [] seq1, char @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(char @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(char @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
eltwiseLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLT(char @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] < seq[i+1]
-
eltwiseLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLTE(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≤ seq[i+1]
-
eltwiseGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGT(char @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] > seq[i+1]
-
eltwiseGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGTE(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≥ seq[i+1]
-
eltsEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqualIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] == i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] == i
-
eltsNotEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqualIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] != i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] != i
-
eltsLtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLtIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] < i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] < i
-
eltsLteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLteIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≤ i
-
eltsGtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGtIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] > i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] > i
-
eltsGteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGteIndex(char @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≥ i
-
collectchar
@SideEffectFree public static char @Nullable [] collectchar(@Nullable Object object, @Nullable String fieldStr)
collectchar accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectchar() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectchar_field
@SideEffectFree public static char collectchar_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectchar_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_double
@Pure public static double getElement_double(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (Double.NaN).
-
getElement_double
@Pure public static double getElement_double(double[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(double @Nullable [] seq1, double @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(double @Nullable [] seq1, float @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(double[] seq1, double[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq2[i] divides seq1[i]
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(double[] seq1, float[] seq2)
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(double[] seq1, double[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == seq2[i] * seq2[i]
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(double[] seq1, float[] seq2)
-
concat
@SideEffectFree public static double @PolyNull [] concat(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
concat
@SideEffectFree public static double @PolyNull [] concat(double @PolyNull [] seq1, float @PolyNull [] seq2)
-
union
@SideEffectFree public static double @PolyNull [] union(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
union
@Pure public static double @PolyNull [] union(double @PolyNull [] seq1, float @PolyNull [] seq2)
-
intersection
@Pure public static double @PolyNull [] intersection(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static double @PolyNull [] intersection(double @PolyNull [] seq1, float @PolyNull [] seq2)
-
setDiff
@Pure public static double @PolyNull [] setDiff(double @PolyNull [] seq1, double @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static double @PolyNull [] setDiff(double @PolyNull [] seq1, float @PolyNull [] seq2)
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(double @Nullable [] seq1, float @Nullable [] seq2)
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(double[] seq1, double[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(double @Nullable [] seq1, float @Nullable [] seq2)
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(double @Nullable [] seq1, float @Nullable [] seq2)
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(double @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(double elt, double @Nullable [] arr)
Returns true iff elt is in array arr.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(double elt, float @Nullable [] arr)
-
slice
@Pure public static double @PolyNull [] slice(double @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static double @PolyNull [] slice(double @PolyNull [] seq, long start, int end)
-
slice
@Pure public static double @PolyNull [] slice(double @PolyNull [] seq, int start, long end)
-
slice
@Pure public static double @PolyNull [] slice(double @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(double @Nullable [] arr, double elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(double @Nullable [] arr, float elt)
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(double @Nullable [] arr, double elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(double @Nullable [] arr, float elt)
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(double @Nullable [] arr, double elt)
True iff every element in arr is greater than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] > elt
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(double @Nullable [] arr, float elt)
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(double @Nullable [] arr, double elt)
True iff every element in arr is greater than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≥ elt
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(double @Nullable [] arr, float elt)
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(double @Nullable [] arr, double elt)
True iff every element in arr is less than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] < elt
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(double @Nullable [] arr, float elt)
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(double @Nullable [] arr, double elt)
True iff every element in arr is less than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≤ elt
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(double @Nullable [] arr, float elt)
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(double @Nullable [] seq1, float @Nullable [] seq2)
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(double @Nullable [] seq1, float @Nullable [] seq2)
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] < seq2[i]
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(double @Nullable [] seq1, float @Nullable [] seq2)
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≤ seq2[i]
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(double @Nullable [] seq1, float @Nullable [] seq2)
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] > seq2[i]
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(double @Nullable [] seq1, float @Nullable [] seq2)
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(double @Nullable [] seq1, double @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≥ seq2[i]
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(double @Nullable [] seq1, float @Nullable [] seq2)
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(double @Nullable [] seq1, float @Nullable [] seq2)
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(double @Nullable [] seq1, float @Nullable [] seq2)
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(double @Nullable [] seq1, float @Nullable [] seq2)
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(double @Nullable [] seq1, float @Nullable [] seq2)
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(double @Nullable [] seq1, float @Nullable [] seq2)
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(double @Nullable [] seq1, double @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(double @Nullable [] seq1, float @Nullable [] seq2)
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(double @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(double @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
eltwiseLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLT(double @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] < seq[i+1]
-
eltwiseLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLTE(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≤ seq[i+1]
-
eltwiseGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGT(double @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] > seq[i+1]
-
eltwiseGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGTE(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≥ seq[i+1]
-
eltsEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqualIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] == i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] == i
-
eltsNotEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqualIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] != i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] != i
-
eltsLtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLtIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] < i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] < i
-
eltsLteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLteIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≤ i
-
eltsGtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGtIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] > i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] > i
-
eltsGteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGteIndex(double @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≥ i
-
collectdouble
@SideEffectFree public static double @Nullable [] collectdouble(@Nullable Object object, @Nullable String fieldStr)
collectdouble accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectdouble() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectdouble_field
@SideEffectFree public static double collectdouble_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectdouble_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_float
@Pure public static float getElement_float(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (Float.NaN).
-
getElement_float
@Pure public static float getElement_float(float[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(float @Nullable [] seq1, float @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(float @Nullable [] seq1, double @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(float[] seq1, float[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq2[i] divides seq1[i]
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(float[] seq1, double[] seq2)
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(float[] seq1, float[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == seq2[i] * seq2[i]
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(float[] seq1, double[] seq2)
-
concat
@SideEffectFree public static float @PolyNull [] concat(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
concat
@SideEffectFree public static double @PolyNull [] concat(float @PolyNull [] seq1, double @PolyNull [] seq2)
-
union
@SideEffectFree public static float @PolyNull [] union(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
union
@Pure public static double @PolyNull [] union(float @PolyNull [] seq1, double @PolyNull [] seq2)
-
intersection
@Pure public static float @PolyNull [] intersection(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static double @PolyNull [] intersection(float @PolyNull [] seq1, double @PolyNull [] seq2)
-
setDiff
@Pure public static float @PolyNull [] setDiff(float @PolyNull [] seq1, float @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static double @PolyNull [] setDiff(float @PolyNull [] seq1, double @PolyNull [] seq2)
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(float @Nullable [] seq1, double @Nullable [] seq2)
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(float[] seq1, float[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(float @Nullable [] seq1, double @Nullable [] seq2)
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(float @Nullable [] seq1, double @Nullable [] seq2)
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(float @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(float elt, float @Nullable [] arr)
Returns true iff elt is in array arr.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(float elt, double @Nullable [] arr)
-
slice
@Pure public static float @PolyNull [] slice(float @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static float @PolyNull [] slice(float @PolyNull [] seq, long start, int end)
-
slice
@Pure public static float @PolyNull [] slice(float @PolyNull [] seq, int start, long end)
-
slice
@Pure public static float @PolyNull [] slice(float @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(float @Nullable [] arr, float elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(float @Nullable [] arr, double elt)
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(float @Nullable [] arr, float elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(float @Nullable [] arr, double elt)
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(float @Nullable [] arr, float elt)
True iff every element in arr is greater than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] > elt
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(float @Nullable [] arr, double elt)
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(float @Nullable [] arr, float elt)
True iff every element in arr is greater than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≥ elt
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(float @Nullable [] arr, double elt)
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(float @Nullable [] arr, float elt)
True iff every element in arr is less than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] < elt
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(float @Nullable [] arr, double elt)
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(float @Nullable [] arr, float elt)
True iff every element in arr is less than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≤ elt
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(float @Nullable [] arr, double elt)
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(float @Nullable [] seq1, double @Nullable [] seq2)
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(float @Nullable [] seq1, double @Nullable [] seq2)
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] < seq2[i]
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(float @Nullable [] seq1, double @Nullable [] seq2)
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≤ seq2[i]
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(float @Nullable [] seq1, double @Nullable [] seq2)
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] > seq2[i]
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(float @Nullable [] seq1, double @Nullable [] seq2)
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(float @Nullable [] seq1, float @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≥ seq2[i]
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(float @Nullable [] seq1, double @Nullable [] seq2)
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(float @Nullable [] seq1, double @Nullable [] seq2)
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(float @Nullable [] seq1, double @Nullable [] seq2)
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(float @Nullable [] seq1, double @Nullable [] seq2)
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(float @Nullable [] seq1, double @Nullable [] seq2)
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(float @Nullable [] seq1, double @Nullable [] seq2)
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(float @Nullable [] seq1, float @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(float @Nullable [] seq1, double @Nullable [] seq2)
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(float @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(float @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
eltwiseLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLT(float @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] < seq[i+1]
-
eltwiseLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLTE(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≤ seq[i+1]
-
eltwiseGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGT(float @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] > seq[i+1]
-
eltwiseGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGTE(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≥ seq[i+1]
-
eltsEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqualIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] == i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] == i
-
eltsNotEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqualIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] != i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] != i
-
eltsLtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLtIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] < i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] < i
-
eltsLteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLteIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≤ i
-
eltsGtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGtIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] > i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] > i
-
eltsGteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGteIndex(float @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≥ i
-
collectfloat
@SideEffectFree public static float @Nullable [] collectfloat(@Nullable Object object, @Nullable String fieldStr)
collectfloat accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectfloat() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectfloat_field
@SideEffectFree public static float collectfloat_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectfloat_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_int
@Pure public static int getElement_int(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (Integer.MAX_VALUE).
-
getElement_int
@Pure public static int getElement_int(int[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(int @Nullable [] seq1, int @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(int @Nullable [] seq1, long @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq2[i] divides seq1[i]
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(int[] seq1, long[] seq2)
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == seq2[i] * seq2[i]
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(int[] seq1, long[] seq2)
-
pairwiseBitwiseComplement
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseComplement(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq1[i] == ~ seq2[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == ~ seq2[i]
-
pairwiseBitwiseComplement
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseComplement(int[] seq1, long[] seq2)
-
pairwiseBitwiseComplement
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseComplement(Object[] seq1, Object[] seq2)
-
pairwiseBitwiseSubset
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseSubset(int[] seq1, int[] seq2)
True iff both sequences have the same length, and all seq1[i] == (seq2[i] | seq1[i]). Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == (seq2[i] | seq1[i])
-
pairwiseBitwiseSubset
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseSubset(int[] seq1, long[] seq2)
-
pairwiseBitwiseSubset
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseSubset(Object[] seq1, Object[] seq2)
-
concat
@SideEffectFree public static int @PolyNull [] concat(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
concat
@SideEffectFree public static long @PolyNull [] concat(int @PolyNull [] seq1, long @PolyNull [] seq2)
-
union
@SideEffectFree public static int @PolyNull [] union(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
union
@Pure public static long @PolyNull [] union(int @PolyNull [] seq1, long @PolyNull [] seq2)
-
intersection
@Pure public static int @PolyNull [] intersection(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static long @PolyNull [] intersection(int @PolyNull [] seq1, long @PolyNull [] seq2)
-
setDiff
@Pure public static int @PolyNull [] setDiff(int @PolyNull [] seq1, int @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static long @PolyNull [] setDiff(int @PolyNull [] seq1, long @PolyNull [] seq2)
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(int @Nullable [] seq1, long @Nullable [] seq2)
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(int[] seq1, int[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(int @Nullable [] seq1, long @Nullable [] seq2)
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(@Nullable Object elts, @Nullable Object arr)
True iff all elements in elts occur once or more in arr; that is, elts is a subset of arr. Meaning (in pseudo-FOL): forall i in { 0..elt.length-1 } : elt[i] element_of arr
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(int @Nullable [] seq1, long @Nullable [] seq2)
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(int @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(int elt, int @Nullable [] arr)
Returns true iff elt is in array arr.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(int elt, long @Nullable [] arr)
-
slice
@Pure public static int @PolyNull [] slice(int @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static int @PolyNull [] slice(int @PolyNull [] seq, long start, int end)
-
slice
@Pure public static int @PolyNull [] slice(int @PolyNull [] seq, int start, long end)
-
slice
@Pure public static int @PolyNull [] slice(int @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(int @Nullable [] arr, int elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(int @Nullable [] arr, long elt)
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(int @Nullable [] arr, int elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(int @Nullable [] arr, long elt)
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(int @Nullable [] arr, int elt)
True iff every element in arr is greater than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] > elt
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(int @Nullable [] arr, long elt)
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(int @Nullable [] arr, int elt)
True iff every element in arr is greater than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≥ elt
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(int @Nullable [] arr, long elt)
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(int @Nullable [] arr, int elt)
True iff every element in arr is less than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] < elt
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(int @Nullable [] arr, long elt)
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(int @Nullable [] arr, int elt)
True iff every element in arr is less than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≤ elt
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(int @Nullable [] arr, long elt)
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(int @Nullable [] seq1, long @Nullable [] seq2)
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(int @Nullable [] seq1, long @Nullable [] seq2)
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] < seq2[i]
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(int @Nullable [] seq1, long @Nullable [] seq2)
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≤ seq2[i]
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(int @Nullable [] seq1, long @Nullable [] seq2)
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] > seq2[i]
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(int @Nullable [] seq1, long @Nullable [] seq2)
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(int @Nullable [] seq1, int @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≥ seq2[i]
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(int @Nullable [] seq1, long @Nullable [] seq2)
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(int @Nullable [] seq1, long @Nullable [] seq2)
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(int @Nullable [] seq1, long @Nullable [] seq2)
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(int @Nullable [] seq1, long @Nullable [] seq2)
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(int @Nullable [] seq1, long @Nullable [] seq2)
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(int @Nullable [] seq1, long @Nullable [] seq2)
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(int @Nullable [] seq1, int @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(int @Nullable [] seq1, long @Nullable [] seq2)
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(int @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(int @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
eltwiseLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLT(int @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] < seq[i+1]
-
eltwiseLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLTE(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≤ seq[i+1]
-
eltwiseGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGT(int @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] > seq[i+1]
-
eltwiseGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGTE(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≥ seq[i+1]
-
eltsEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqualIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] == i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] == i
-
eltsNotEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqualIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] != i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] != i
-
eltsLtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLtIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] < i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] < i
-
eltsLteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLteIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≤ i
-
eltsGtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGtIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] > i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] > i
-
eltsGteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGteIndex(int @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≥ i
-
collectint
@SideEffectFree public static int @Nullable [] collectint(@Nullable Object object, @Nullable String fieldStr)
collectint accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectint() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectint_field
@SideEffectFree public static int collectint_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectint_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_long
@Pure public static long getElement_long(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (Long.MAX_VALUE).
-
getElement_long
@Pure public static long getElement_long(long[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(long @Nullable [] seq1, long @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(long @Nullable [] seq1, int @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq2[i] divide seq1[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq2[i] divides seq1[i]
-
pairwiseDivides
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseDivides(long[] seq1, int[] seq2)
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq1[i] == seq2[i] * seq2[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == seq2[i] * seq2[i]
-
pairwiseSquare
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseSquare(long[] seq1, int[] seq2)
-
pairwiseBitwiseComplement
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseComplement(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq1[i] == ~ seq2[i]. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == ~ seq2[i]
-
pairwiseBitwiseComplement
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseComplement(long[] seq1, int[] seq2)
-
pairwiseBitwiseSubset
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseSubset(long[] seq1, long[] seq2)
True iff both sequences have the same length, and all seq1[i] == (seq2[i] | seq1[i]). Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq2.length-1 } : seq1[i] == (seq2[i] | seq1[i])
-
pairwiseBitwiseSubset
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseBitwiseSubset(long[] seq1, int[] seq2)
-
concat
@SideEffectFree public static long @PolyNull [] concat(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
concat
@SideEffectFree public static long @PolyNull [] concat(long @PolyNull [] seq1, int @PolyNull [] seq2)
-
union
@SideEffectFree public static long @PolyNull [] union(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
union
@Pure public static long @PolyNull [] union(long @PolyNull [] seq1, int @PolyNull [] seq2)
-
intersection
@Pure public static long @PolyNull [] intersection(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static long @PolyNull [] intersection(long @PolyNull [] seq1, int @PolyNull [] seq2)
-
setDiff
@Pure public static long @PolyNull [] setDiff(long @PolyNull [] seq1, long @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static long @PolyNull [] setDiff(long @PolyNull [] seq1, int @PolyNull [] seq2)
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(long @Nullable [] seq1, int @Nullable [] seq2)
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(long[] seq1, long[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(long @Nullable [] seq1, int @Nullable [] seq2)
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(long @Nullable [] seq1, int @Nullable [] seq2)
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(long @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(long elt, long @Nullable [] arr)
Returns true iff elt is in array arr.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(long elt, int @Nullable [] arr)
-
slice
@Pure public static long @PolyNull [] slice(long @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static long @PolyNull [] slice(long @PolyNull [] seq, long start, int end)
-
slice
@Pure public static long @PolyNull [] slice(long @PolyNull [] seq, int start, long end)
-
slice
@Pure public static long @PolyNull [] slice(long @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(long @Nullable [] arr, long elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(long @Nullable [] arr, int elt)
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(long @Nullable [] arr, long elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(long @Nullable [] arr, int elt)
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(long @Nullable [] arr, long elt)
True iff every element in arr is greater than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] > elt
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(long @Nullable [] arr, int elt)
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(long @Nullable [] arr, long elt)
True iff every element in arr is greater than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≥ elt
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(long @Nullable [] arr, int elt)
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(long @Nullable [] arr, long elt)
True iff every element in arr is less than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] < elt
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(long @Nullable [] arr, int elt)
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(long @Nullable [] arr, long elt)
True iff every element in arr is less than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≤ elt
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(long @Nullable [] arr, int elt)
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(long @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(long @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] < seq2[i]
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(long @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≤ seq2[i]
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(long @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] > seq2[i]
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(long @Nullable [] seq1, int @Nullable [] seq2)
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(long @Nullable [] seq1, long @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≥ seq2[i]
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(long @Nullable [] seq1, int @Nullable [] seq2)
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(long @Nullable [] seq1, int @Nullable [] seq2)
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(long @Nullable [] seq1, int @Nullable [] seq2)
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(long @Nullable [] seq1, int @Nullable [] seq2)
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(long @Nullable [] seq1, int @Nullable [] seq2)
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(long @Nullable [] seq1, int @Nullable [] seq2)
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(long @Nullable [] seq1, long @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(long @Nullable [] seq1, int @Nullable [] seq2)
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(long @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(long @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
eltwiseLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLT(long @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] < seq[i+1]
-
eltwiseLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLTE(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≤ seq[i+1]
-
eltwiseGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGT(long @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] > seq[i+1]
-
eltwiseGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGTE(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≥ seq[i+1]
-
eltsEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqualIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] == i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] == i
-
eltsNotEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqualIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] != i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] != i
-
eltsLtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLtIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] < i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] < i
-
eltsLteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLteIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≤ i
-
eltsGtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGtIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] > i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] > i
-
eltsGteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGteIndex(long @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≥ i
-
collectlong
@SideEffectFree public static long @Nullable [] collectlong(@Nullable Object object, @Nullable String fieldStr)
collectlong accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectlong() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectlong_field
@SideEffectFree public static long collectlong_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectlong_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_short
@Pure public static short getElement_short(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (Short.MAX_VALUE).
-
getElement_short
@Pure public static short getElement_short(short[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(short @Nullable [] seq1, short @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
concat
@SideEffectFree public static short @PolyNull [] concat(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
union
@SideEffectFree public static short @PolyNull [] union(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static short @PolyNull [] intersection(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static short @PolyNull [] setDiff(short @PolyNull [] seq1, short @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(short[] seq1, short[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(short @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(short elt, short @Nullable [] arr)
Returns true iff elt is in array arr.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(long elt, short @Nullable [] arr)
-
slice
@Pure public static short @PolyNull [] slice(short @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static short @PolyNull [] slice(short @PolyNull [] seq, long start, int end)
-
slice
@Pure public static short @PolyNull [] slice(short @PolyNull [] seq, int start, long end)
-
slice
@Pure public static short @PolyNull [] slice(short @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(short @Nullable [] arr, short elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(short @Nullable [] arr, short elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
eltsGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGT(short @Nullable [] arr, short elt)
True iff every element in arr is greater than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] > elt
-
eltsGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGTE(short @Nullable [] arr, short elt)
True iff every element in arr is greater than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≥ elt
-
eltsLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLT(short @Nullable [] arr, short elt)
True iff every element in arr is less than elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] < elt
-
eltsLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLTE(short @Nullable [] arr, short elt)
True iff every element in arr is less than or equal to elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] ≤ elt
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
pairwiseLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLT(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] < seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] < seq2[i]
-
pairwiseLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseLTE(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≤ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≤ seq2[i]
-
pairwiseGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGT(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] > seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] > seq2[i]
-
pairwiseGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseGTE(short @Nullable [] seq1, short @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] ≥ seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] ≥ seq2[i]
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
lexLT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLT(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically < seq2.
-
lexLTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexLTE(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically ≤ to seq2.
-
lexGT
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGT(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically > to seq2.
-
lexGTE
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexGTE(short @Nullable [] seq1, short @Nullable [] seq2)
Returns true iff seq1 is lexically ≥ to seq2.
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(short @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(short @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
eltwiseLT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLT(short @Nullable [] seq)
True iff for all applicable i, every seq[i] < seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] < seq[i+1]
-
eltwiseLTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseLTE(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≤ seq[i+1]
-
eltwiseGT
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGT(short @Nullable [] seq)
True iff for all applicable i, every seq[i] > seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] > seq[i+1]
-
eltwiseGTE
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseGTE(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] ≥ seq[i+1]
-
eltsEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqualIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] == i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] == i
-
eltsNotEqualIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqualIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] != i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] != i
-
eltsLtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLtIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] < i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] < i
-
eltsLteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsLteIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≤ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≤ i
-
eltsGtIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGtIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] > i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] > i
-
eltsGteIndex
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsGteIndex(short @Nullable [] seq)
True iff for all applicable i, every seq[i] ≥ i. Meaning (in pseudo-FOL): forall i in { 0..seq.length-1 } : seq[i] ≥ i
-
collectshort
@SideEffectFree public static short @Nullable [] collectshort(@Nullable Object object, @Nullable String fieldStr)
collectshort accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectshort() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectshort_field
@SideEffectFree public static short collectshort_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectshort_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_Object
@Pure public static @Nullable @Interned Object getElement_Object(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (null).
-
getElement_Object
@Pure public static @Nullable @Interned Object getElement_Object(Object[] arr, long i)
-
typeArray
@SideEffectFree public static @PolyNull String @PolyNull [] typeArray(@PolyNull @Interned Object @PolyNull [] seq)
Returns an array of Strings, where the strings are the result of invoking x.getClass().toString() for each element x in the array. If an element of the array is null, its slot in the returned array is null.
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(Object @Nullable [] seq1, Object @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
concat
@SideEffectFree public static @Interned Object @PolyNull [] concat(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
union
@SideEffectFree public static @Interned Object @PolyNull [] union(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static @Interned Object @PolyNull [] intersection(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static @Interned Object @PolyNull [] setDiff(@Interned Object @PolyNull [] seq1, @Interned Object @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(@Interned Object[] seq1, @Interned Object[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(@PolyNull Collection<? extends @Interned Object> seq1, @Interned Object @Nullable [] seq2)
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(@Nullable Collection<? extends @Interned Object> seq1, @Interned Object @Nullable [] seq2)
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(@Interned Object @Nullable [] seq1, @Nullable Collection<? extends @Interned Object> seq2)
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(@Interned Object @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(@Interned Object elt, @Interned Object @Nullable [] arr)
Returns true iff elt is in array arr.
-
slice
@Pure public static @Interned Object @PolyNull [] slice(@Interned Object @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static @Interned Object @PolyNull [] slice(@Interned Object @PolyNull [] seq, long start, int end)
-
slice
@Pure public static @Interned Object @PolyNull [] slice(@Interned Object @PolyNull [] seq, int start, long end)
-
slice
@Pure public static @Interned Object @PolyNull [] slice(@Interned Object @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(@Interned Object @Nullable [] arr, @Interned Object elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(@Interned Object @Nullable [] arr, @Interned Object elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(@Nullable AbstractCollection<@Interned Object> seq1, @Interned Object @Nullable [] seq2)
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(@Interned Object @Nullable [] seq1, @Nullable AbstractCollection<@Interned Object> seq2)
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(@Interned Object @Nullable [] seq1, @Interned Object @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(@Interned Object @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(@Interned Object @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
collectObject
@SideEffectFree public static Object @Nullable [] collectObject(@Nullable Object object, @Nullable String fieldStr)
collectObject accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectObject() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectObject_field
@SideEffectFree public static @Nullable Object collectObject_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectObject_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
getElement_String
@Pure public static @Nullable @Interned String getElement_String(Object o, long i)
Returns the ith element of the array or collection argument. If the argument is null or not an array or collection, returns a default value (null).
-
getElement_String
@Pure public static @Nullable @Interned String getElement_String(String[] arr, long i)
-
sameLength
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean sameLength(String @Nullable [] seq1, String @Nullable [] seq2)
True iff both sequences are non-null and have the same length.
-
concat
@SideEffectFree public static @Interned String @PolyNull [] concat(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns the array { seq1[0], ..., seq1[seq1.length-1], seq2[0], ... , seq2[seq2.length-1] } .If either array is null, returns null. If either array is empty, returns only those elements in the other array. If both arrays are empty, returns a new empty array.
-
union
@SideEffectFree public static @Interned String @PolyNull [] union(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns an array that is equivalent to the set union of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
intersection
@Pure public static @Interned String @PolyNull [] intersection(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns an array that is equivalent to the set intersection of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setDiff
@Pure public static @Interned String @PolyNull [] setDiff(@Interned String @PolyNull [] seq1, @Interned String @PolyNull [] seq2)
Returns an array that is equivalent to the set difference of seq1 and seq2. This method gives no assurances about the order or repetition of elements: elements may be repeated, and their order may be different from the order of elements in seq1 and seq2.
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
Returns true iff seq1 and seq2 are equal when considered as sets.
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(@Interned String[] seq1, @Interned String[] seq2)
True iff seq1 is the reverse of seq2. Meaning (in pseudo-FOL):/\ seq1.length == seq2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[seq2.length-1-i]
-
subsetOf
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean subsetOf(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
True iff seq1 is a subset of seq2, when the sequences are considered as sets.
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(@Interned String @Nullable [] seq)
Returns true iff seq contains no duplicate elements.
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(@Interned String elt, @Interned String @Nullable [] arr)
Returns true iff elt is in array arr.
-
slice
@Pure public static @Interned String @PolyNull [] slice(@Interned String @PolyNull [] seq, int start, int end)
Returns a subsequence of seq with first elements seq[start] and last element seq[end].
-
slice
@Pure public static @Interned String @PolyNull [] slice(@Interned String @PolyNull [] seq, long start, int end)
-
slice
@Pure public static @Interned String @PolyNull [] slice(@Interned String @PolyNull [] seq, int start, long end)
-
slice
@Pure public static @Interned String @PolyNull [] slice(@Interned String @PolyNull [] seq, long start, long end)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(@Interned String @Nullable [] arr, @Interned String elt)
True iff all elements in arr equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] == elt
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(@Interned String @Nullable [] arr, @Interned String elt)
True iff every element in arr does not equal elt. Meaning (in pseudo-FOL): forall i in { 0..arr.length-1 } : arr[i] != elt
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] == seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] == seq2[i]
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(@Nullable AbstractCollection<@Interned String> seq1, @Interned String @Nullable [] seq2)
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(@Interned String @Nullable [] seq1, @Nullable AbstractCollection<@Interned String> seq2)
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
True iff seq1 and seq2 have the same length, and every seq1[i] != seq2[i]. Meaning (in pseudo-FOL): /\ seq1.length == se2.length /\ forall i in { 0..seq1.length-1 } : seq1[i] != seq2[i]
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
Returns true iff seq1 is lexically equal to seq2. For equality, "lexically" and "pairwise" are the same.
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(@Interned String @Nullable [] seq1, @Interned String @Nullable [] seq2)
Returns true iff seq1 is lexically not equal to seq2.
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(@Interned String @Nullable [] seq)
True iff for all applicable i, every seq[i] == seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] == seq[i+1]
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(@Interned String @Nullable [] seq)
True iff for all applicable i, every seq[i] != seq[i+1]. Meaning (in pseudo-FOL): forall i in { 0..seq.length-2 } : seq[i] != seq[i+1]
-
collectString
@SideEffectFree public static String @Nullable [] collectString(@Nullable Object object, @Nullable String fieldStr)
collectString accepts an object and a list of fields (one of which is of array type, and the rest of which are not), and produces an array in which the original object has had the given fields accessed.Daikon creates invariants over "variables" such as the following.
- x.arr[].z
- The result of collecting all elements y.z for all y's in array x.arr.
- arr[].y.z
- The result of collecting all elements x.y.z for all x's in array arr.
- x.y.z[]
- The result of collecting all elements in array x.y.z[]
The collectString() method does this collecting work.
Given an object (x, arr, or x, correspondingly, in the above examples) and a "field string" (arr.z, y.z, or y.z, correspondingly, in the above example), the collect method collects the elements that result from following the fields, one of which is assumed to be an array.
requires: fieldStr.length() > 0 and object != null
requires: fieldStr contains only field names, no "[]" strings.
requires: the method only works for field sequences with exactly one field representing an array. For example, the collection a[].b[].c will fail.
- Returns:
- if the resulting collection is of non-primitive type, then returns an array of type Object[]. Returns null if any array or field access causes an exception.
-
collectString_field
@SideEffectFree public static @Nullable String collectString_field(Object object, String fieldStr)
Returns the results of dereferencing the fields for 'object'. For example, the callcollectString_field(x, "f.g.h")
has the same value asx.f.g.h
. Returns a default value if any field access causes an exception.
-
noDups
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean noDups(Object seq)
SeenoDups(Object[])
.- See Also:
noDups(Object[])
-
typeArray
public static String @PolyNull [] typeArray(@PolyNull Object seq)
SeetypeArray(Object[])
.- See Also:
typeArray(Object[])
-
eltwiseEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseEqual(Object seq)
- See Also:
eltwiseEqual(Object[])
-
eltwiseNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltwiseNotEqual(Object seq)
- See Also:
eltwiseNotEqual(Object[])
-
concat
@SideEffectFree public static Object @PolyNull [] concat(@PolyNull Object seq1, @PolyNull Object seq2)
- See Also:
concat(Object[], Object[])
-
union
@SideEffectFree public static Object @PolyNull [] union(@PolyNull Object seq1, @PolyNull Object seq2)
- See Also:
union(Object[], Object[])
-
intersection
@SideEffectFree public static Object @PolyNull [] intersection(@PolyNull Object seq1, @PolyNull Object seq2)
- See Also:
intersection(Object[], Object[])
-
setDiff
@SideEffectFree public static Object @PolyNull [] setDiff(@PolyNull Object seq1, @PolyNull Object seq2)
- See Also:
setDiff(Object[], Object[])
-
setEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean setEqual(@Nullable Object seq1, @Nullable Object seq2)
- See Also:
setEqual(Object[], Object[])
-
isReverse
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean isReverse(@Nullable Object seq1, @Nullable Object seq2)
- See Also:
isReverse(Object[], Object[])
-
pairwiseEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseEqual(@Nullable Object seq1, @Nullable Object seq2)
- See Also:
pairwiseEqual(Object[], Object[])
-
pairwiseNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean pairwiseNotEqual(@Nullable Object seq1, @Nullable Object seq2)
- See Also:
pairwiseNotEqual(Object[], Object[])
-
lexEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexEqual(@Nullable Object seq1, @Nullable Object seq2)
- See Also:
lexEqual(Object[], Object[])
-
lexNotEqual
@EnsuresNonNullIf(result=true, expression={"#1","#2"}) @Pure public static boolean lexNotEqual(@Nullable Object seq1, @Nullable Object seq2)
- See Also:
lexNotEqual(Object[], Object[])
-
memberOf
@EnsuresNonNullIf(result=true, expression="#2") @Pure public static boolean memberOf(Object elt, @Nullable Object arr)
- See Also:
memberOf(Object, Object[])
-
slice
@SideEffectFree public static Object @PolyNull [] slice(@PolyNull Object seq, int start, int end)
- See Also:
slice(Object[], int, int)
-
eltsEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsEqual(@Nullable Object arr, Object elt)
- See Also:
eltsEqual(Object[], Object)
-
eltsNotEqual
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean eltsNotEqual(@Nullable Object arr, Object elt)
- See Also:
eltsNotEqual(Object[], Object)
-
isIntegralType
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean isIntegralType(@Nullable Class<?> c)
-
isRealType
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean isRealType(@Nullable Class<?> c)
-
isNumericType
@EnsuresNonNullIf(result=true, expression="#1") @Pure public static boolean isNumericType(Class<?> c)
-
toObjArray
public static Object @PolyNull [] toObjArray(@PolyNull Object o)
Returns an Object[] array, either by casting or by conversion from an AbstractCollection.
-
-