Record Class RelationalAudience<A extends Audience>
java.lang.Object
java.lang.Record
io.github.miniplaceholders.api.types.RelationalAudience<A>
- Type Parameters:
A- the audiences type- Record Components:
audience- the principal audiencerelational- the secondary audience, with which the relationship will be evaluated
- All Implemented Interfaces:
Audience,ForwardingAudience,ForwardingAudience.Single,Pointered
public record RelationalAudience<A extends Audience>(A extends Audience audience, A extends Audience relational)
extends Record
implements ForwardingAudience.Single
A relationship between 2 Audiences.
- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single -
Constructor Summary
ConstructorsConstructorDescriptionRelationalAudience(A audience, A relational) Creates an instance of aRelationalAudiencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionaudience()Returns the value of theaudiencerecord component.final booleanIndicates whether some other object is "equal to" this one.static <A extends Audience>
RelationalAudience<A> from(A audience, A relational) Creates a new relation between two audiences.final inthashCode()Returns a hash code value for this object.Returns the value of therelationalrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience.Single
audiences, clearResourcePacks, clearTitle, closeDialog, deleteMessage, filterAudience, forEachAudience, get, getOrDefault, getOrDefaultFrom, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, showDialog, stopSound
-
Constructor Details
-
RelationalAudience
Creates an instance of aRelationalAudiencerecord class.- Parameters:
audience- the value for theaudiencerecord componentrelational- the value for therelationalrecord component
-
-
Method Details
-
from
Creates a new relation between two audiences.- Type Parameters:
A- the audiences type- Parameters:
audience- the principal audiencerelational- the secondary audience, with which the relationship will be evaluated- Returns:
- a new relation
- Since:
- 3.0.0
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
audience
Returns the value of theaudiencerecord component.- Specified by:
audiencein interfaceForwardingAudience.Single- Returns:
- the value of the
audiencerecord component
-
relational
Returns the value of therelationalrecord component.- Returns:
- the value of the
relationalrecord component
-