code: private static void getExplicitOverrides(Channel channel, Member member, AtomicLong allow, AtomicLong deny)
      {
          PermissionOverride override = channel.getPermissionOverride(member.getGuild().getPublicRole());
          long allowRaw = 0;
          long denyRaw = 0;
          if (override != null)
          {
              denyRaw = override.getDeniedRaw();
              allowRaw = override.getAllowedRaw();
          }
  
          long allowRole = 0;
          long denyRole = 0;
          // create temporary bit containers for role cascade
          for (Role role : member.getRoles())
          {
              override = channel.getPermissionOverride(role);
              if (override != null)
              {
                  // important to update role cascade not others
                  denyRole |= override.getDeniedRaw();
                  allowRole |= override.getAllowedRaw();
              }
          }
          // Override the raw values of public role then apply role cascade
          allowRaw = (allowRaw & ~denyRole) | allowRole;
          denyRaw = (denyRaw & ~allowRole) | denyRole;
  
          override = channel.getPermissionOverride(member);
          if (override != null)
          {
              // finally override the role cascade with member overrides
              final long oDeny = override.getDeniedRaw();
              final long oAllow = override.getAllowedRaw();
              allowRaw = (allowRaw & ~oDeny) | oAllow;
              denyRaw = (denyRaw & ~oAllow) | oDeny;
              // this time we need to exclude new allowed bits from old denied ones and OR the new denied bits as final overrides
          }
          // set as resulting values
          allow.set(allowRaw);
          deny.set(denyRaw);
      }
docs: Pushes all deny/allow values to the specified BiConsumer
  <br>First parameter is allow, second is deny