From: Tim M. <ma...@us...> - 2003-04-10 01:04:15
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic In directory sc8-pr-cvs1:/tmp/cvs-serv2619/src/core/com/mockobjects/dynamic Modified Files: Tag: DynamicMockExperiment C.java Log Message: Conveniance for eq Constraint[] Index: C.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic/C.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- C.java 4 Apr 2003 16:47:38 -0000 1.1.2.1 +++ C.java 10 Apr 2003 01:04:11 -0000 1.1.2.2 @@ -30,6 +30,14 @@ return new IsEqual(o); } + public static Constraint[] eq( Object[] o ) { + Constraint[] result = new Constraint[o.length]; + for (int i = 0; i < result.length; i++) { + result[i] = new IsEqual(o[i]); + } + return result; + } + public static Constraint eq( int n ) { return new IsEqual( new Integer(n) ); } |