修改Fields各字段类型

This commit is contained in:
qidaijie
2023-12-14 10:55:03 +08:00
parent 87a6951c23
commit 9e2d7350ea
6 changed files with 82 additions and 118 deletions

View File

@@ -32,29 +32,25 @@ public class FlagsTest {
@Test
public void bitwiseAND() {
Long common_flags = 8200L;
Long flags = 24712L;
Long clientIsLocal = 8L;
Long serverIsLocal = 16L;
System.out.println("common_flags & clientIsLocal = " + (common_flags & clientIsLocal));
System.out.println("common_flags & serverIsLocal = " + (common_flags & serverIsLocal)+"\n\n");
System.out.println("flags & clientIsLocal = " + (flags & clientIsLocal));
System.out.println("flags & serverIsLocal = " + (flags & serverIsLocal)+"\n\n");
common_flags = 16400L;
flags = 16400L;
System.out.println("common_flags & clientIsLocal = " + (common_flags & clientIsLocal));
System.out.println("common_flags & serverIsLocal = " + (common_flags & serverIsLocal)+"\n\n");
System.out.println("flags & clientIsLocal = " + (flags & clientIsLocal));
System.out.println("flags & serverIsLocal = " + (flags & serverIsLocal)+"\n\n");
common_flags = 1062135466L;
flags = 24712L;
System.out.println("common_flags & clientIsLocal = " + (common_flags & 128));
System.out.println("common_flags & serverIsLocal = " + (common_flags & 256)+"\n\n");
System.out.println("flags & c2s = " + (flags & 8192));
System.out.println("flags & s2c = " + (flags & 16384));
System.out.println("flags & Bidirectional = " + (flags & 32768));
if ((0L & clientIsLocal) == 0L){
System.out.println("yes");
}else {
System.out.println("no");
}
}
}