Added test classes for the networking and made so that the network engine sends object insted of raw data
This commit is contained in:
parent
a0363aa3d8
commit
16b9f1f265
11 changed files with 161 additions and 53 deletions
|
|
@ -48,4 +48,20 @@ public class Converter {
|
|||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given interface is implemented in the object
|
||||
* @param object The object to look for the interface
|
||||
* @param interf The interface to look for
|
||||
* @return True if the interface is implemented else false
|
||||
*/
|
||||
public static boolean isInstanceOf(Object object, Class interf){
|
||||
Class[] objectInterf = object.getClass().getInterfaces();
|
||||
for(int i=0; i<objectInterf.length ;i++){
|
||||
if(objectInterf[i] == interf){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue