@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && this.name.equals(((SimpUser) other).getName()))); }
@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && getName().equals(((SimpUser) other).getName()))); }
/** * Constructor to create user from a local user. */ public TransferSimpUser(SimpUser user) { this.name = user.getName(); Set<SimpSession> sessions = user.getSessions(); this.sessions = new HashSet<>(sessions.size()); for (SimpSession session : sessions) { this.sessions.add(new TransferSimpSession(session)); } }
/** * Constructor to create DTO from a local user registry. */ public UserRegistrySnapshot(String id, SimpUserRegistry registry) { this.id = id; Set<SimpUser> users = registry.getUsers(); this.users = new HashMap<>(users.size()); for (SimpUser user : users) { this.users.put(user.getName(), new TransferSimpUser(user)); } }
@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && this.name.equals(((SimpUser) other).getName()))); }
@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && this.name.equals(((SimpUser) other).getName()))); }
/** * Constructor to create user from a local user. */ public TransferSimpUser(SimpUser user) { this.name = user.getName(); Set<SimpSession> sessions = user.getSessions(); this.sessions = new HashSet<>(sessions.size()); for (SimpSession session : sessions) { this.sessions.add(new TransferSimpSession(session)); } }
/** * Constructor to create DTO from a local user registry. */ public UserRegistrySnapshot(String id, SimpUserRegistry registry) { this.id = id; Set<SimpUser> users = registry.getUsers(); this.users = new HashMap<>(users.size()); for (SimpUser user : users) { this.users.put(user.getName(), new TransferSimpUser(user)); } }
@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && this.name.equals(((SimpUser) other).getName()))); }
@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && this.name.equals(((SimpUser) other).getName()))); }
@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && getName().equals(((SimpUser) other).getName()))); }
@Override public boolean equals(Object other) { return (this == other || (other instanceof SimpUser && getName().equals(((SimpUser) other).getName()))); }
/** * Constructor to create DTO from a local user registry. */ public UserRegistrySnapshot(String id, SimpUserRegistry registry) { this.id = id; Set<SimpUser> users = registry.getUsers(); this.users = new HashMap<>(users.size()); for (SimpUser user : users) { this.users.put(user.getName(), new TransferSimpUser(user)); } }
/** * Constructor to create user from a local user. */ public TransferSimpUser(SimpUser user) { this.name = user.getName(); Set<SimpSession> sessions = user.getSessions(); this.sessions = new HashSet<>(sessions.size()); for (SimpSession session : sessions) { this.sessions.add(new TransferSimpSession(session)); } }
/** * Constructor to create DTO from a local user registry. */ public UserRegistrySnapshot(String id, SimpUserRegistry registry) { this.id = id; Set<SimpUser> users = registry.getUsers(); this.users = new HashMap<>(users.size()); for (SimpUser user : users) { this.users.put(user.getName(), new TransferSimpUser(user)); } }
/** * Constructor to create user from a local user. */ public TransferSimpUser(SimpUser user) { this.name = user.getName(); Set<SimpSession> sessions = user.getSessions(); this.sessions = new HashSet<>(sessions.size()); for (SimpSession session : sessions) { this.sessions.add(new TransferSimpSession(session)); } }