public class PermissionOverrideImpl extends java.lang.Object implements PermissionOverride
Constructor and Description |
---|
PermissionOverrideImpl(Channel channel,
User user,
Role role) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.util.List<Permission> |
getAllowed()
An unmodifiable list of all
Permissions that are specifically allowed by this override. |
int |
getAllowedRaw()
This is the raw binary representation (as a base 10 int) of the permissions allowed by this override.
The integer relates to the offsets used by each Permission . |
Channel |
getChannel()
The
Channel that this PermissionOverride affects. |
java.util.List<Permission> |
getDenied()
An unmodifiable list of all
Permissions that are denied by this override. |
int |
getDeniedRaw()
This is the raw binary representation (as a base 10 int) of the permissions denied by this override.
The integer relates to the offsets used by each Permission . |
Guild |
getGuild()
|
java.util.List<Permission> |
getInherit()
An unmodifiable list of all
Permission that are unaffected by this override. |
int |
getInheritRaw()
This is the raw binary representation (as a base 10 int) of the permissions not affected by this override.
The integer relates to the offsets used by each Permission . |
JDA |
getJDA()
The
JDA instance that this PermissionOverride is related to. |
PermissionOverrideManager |
getManager()
Returns the
PermissionOverrideManager for this PermissionOverride. |
Role |
getRole()
If this
PermissionOverride is an override dealing with
a Role , then this method will return the related Role .Otherwise, this method returns null .Basically: if PermissionOverride.isRoleOverride() returns false , this returns null . |
User |
getUser()
If this
PermissionOverride is an override dealing with
a User , then this method will return the related User .Otherwise, this method returns null .Basically: if PermissionOverride.isUserOverride() returns false , this returns null . |
int |
hashCode() |
boolean |
isRoleOverride()
Used to determine if this
PermissionOverride relates to
a specific Role . |
boolean |
isUserOverride()
Used to determine if this
PermissionOverride relates to
a specific User . |
PermissionOverrideImpl |
setAllow(int allow) |
PermissionOverrideImpl |
setDeny(int deny) |
java.lang.String |
toString() |
public int getAllowedRaw()
PermissionOverride
Permission
.getAllowedRaw
in interface PermissionOverride
public int getInheritRaw()
PermissionOverride
Permission
.getInheritRaw
in interface PermissionOverride
public int getDeniedRaw()
PermissionOverride
Permission
.getDeniedRaw
in interface PermissionOverride
public java.util.List<Permission> getAllowed()
PermissionOverride
Permissions
that are specifically allowed by this override.getAllowed
in interface PermissionOverride
Permissions
.public java.util.List<Permission> getInherit()
PermissionOverride
Permission
that are unaffected by this override.getInherit
in interface PermissionOverride
Permissions
.public java.util.List<Permission> getDenied()
PermissionOverride
Permissions
that are denied by this override.getDenied
in interface PermissionOverride
Permissions
.public JDA getJDA()
PermissionOverride
JDA
instance that this PermissionOverride
is related to.getJDA
in interface PermissionOverride
JDA
instance.public User getUser()
PermissionOverride
PermissionOverride
is an override dealing with
a User
, then this method will return the related User
.null
.PermissionOverride.isUserOverride()
returns false
, this returns null
.getUser
in interface PermissionOverride
User
.public Role getRole()
PermissionOverride
PermissionOverride
is an override dealing with
a Role
, then this method will return the related Role
.null
.PermissionOverride.isRoleOverride()
returns false
, this returns null
.getRole
in interface PermissionOverride
Role
.public Channel getChannel()
PermissionOverride
Channel
that this PermissionOverride
affects.getChannel
in interface PermissionOverride
Channel
that this override is part of.public Guild getGuild()
PermissionOverride
Guild
that the Channel
returned
from PermissionOverride.getChannel()
is a part of. By inference, this is the Guild
that this PermissionOverride
is part of.getGuild
in interface PermissionOverride
Guild
.public boolean isUserOverride()
PermissionOverride
PermissionOverride
relates to
a specific User
.isUserOverride
in interface PermissionOverride
public boolean isRoleOverride()
PermissionOverride
PermissionOverride
relates to
a specific Role
.isRoleOverride
in interface PermissionOverride
public PermissionOverrideImpl setAllow(int allow)
public PermissionOverrideImpl setDeny(int deny)
public PermissionOverrideManager getManager()
PermissionOverride
PermissionOverrideManager
for this PermissionOverride.
In the PermissionOverrideManager, you can modify its permissions.getManager
in interface PermissionOverride
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object