Java Code Examples for org.apache.flink.api.java.tuple.Tuple3#getArity()

The following examples show how to use org.apache.flink.api.java.tuple.Tuple3#getArity() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TupleComparatorTTT3Test.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 2
Source File: TupleComparatorTTT1Test.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 3
Source File: TupleComparatorTTT2Test.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 4
Source File: TupleComparatorTTT3Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 5
Source File: TupleComparatorTTT1Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 6
Source File: TupleComparatorTTT2Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 7
Source File: TupleComparatorTTT3Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 8
Source File: TupleComparatorTTT1Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 9
Source File: TupleComparatorTTT2Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}