atavism.server.voice
Class PositionalVoiceGroup.CompareLocations
java.lang.Object
atavism.server.voice.PositionalVoiceGroup.CompareLocations
- All Implemented Interfaces:
- java.util.Comparator<GroupMember>
- Enclosing class:
- PositionalVoiceGroup
public static class PositionalVoiceGroup.CompareLocations
- extends java.lang.Object
- implements java.util.Comparator<GroupMember>
A comparator class that compares locations of speakers
to order the closest ones near the front of the list.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PositionalVoiceGroup.CompareLocations
public PositionalVoiceGroup.CompareLocations(Point center)
compare
public int compare(GroupMember m1,
GroupMember m2)
- Which speaker member is closer to the Listener whose location is center?
Compares first locations, and if they are equal, compares the index values
of the speaker members.
- Specified by:
compare
in interface java.util.Comparator<GroupMember>
- Parameters:
m1
- The first member.m2
- The second member.
equals
public boolean equals(java.lang.Object other)
- Specified by:
equals
in interface java.util.Comparator<GroupMember>
- Overrides:
equals
in class java.lang.Object
getCenter
public Point getCenter()
setCenter
public void setCenter(Point center)