Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
The index of current item.
|
static java.lang.String |
X
A random integer.
|
static java.lang.String |
Y
A random String.
|
static java.lang.String |
Z
A random float number.
|
EOS, TIME_CREATED
Constructor and Description |
---|
TestItem(TestObject testObject) |
Modifier and Type | Method and Description |
---|---|
static PStreamProvider |
asUpdates(int maxInt,
double maxDouble,
long interval)
Provide a live stream of TestItem items, which are randomly generated.
|
static PStreamProvider |
asUpdatesFrom(java.util.List<TestObject> testObjects,
long interval)
Provide a live stream of TestItem items, which are from a given list.
|
static PStreamProvider |
getAllFrom(java.util.List<TestObject> testObjects)
Provide a stream of existing TestItem items, which are from a given list.
|
static PStreamProvider |
getAllRandom(int maxInt,
double maxDouble,
int count)
Provide a list of TestItem items, which are randomly generated.
|
containsField, equals, excludeFields, getAsBoolean, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsString, getValueByField, includeFields, isEndOfStream, setFieldValue, toDebugString, toJson, toMap, toString
@PSItemField(type=java.lang.Long.class) public static final java.lang.String ID
@PSItemField(type=java.lang.Integer.class) public static final java.lang.String X
@PSItemField(type=java.lang.String.class) public static final java.lang.String Y
@PSItemField(type=java.lang.Double.class) public static final java.lang.String Z
public TestItem(TestObject testObject)
public static PStreamProvider asUpdatesFrom(java.util.List<TestObject> testObjects, long interval)
testObjects
- the list of mock datainterval
- the interval between each two items, in millisecondspublic static PStreamProvider asUpdates(int maxInt, double maxDouble, long interval)
maxInt
- the max value of the int field of the random mock itemsmaxDouble
- the max value of the double field of the random mock itemsinterval
- the interval between each two items, in millisecondspublic static PStreamProvider getAllFrom(java.util.List<TestObject> testObjects)
testObjects
- the list of mock datapublic static PStreamProvider getAllRandom(int maxInt, double maxDouble, int count)
maxInt
- the max value of the int field of the random mock itemsmaxDouble
- the max value of the double field of the random mock itemscount
- the number of random items