source: trunk/src/org/expeditee/gui/Overlay.java@ 309

Last change on this file since 309 was 154, checked in by ra33, 16 years ago

Fixing bugs for Rob

File size: 712 bytes
Line 
1package org.expeditee.gui;
2
3import java.util.Collection;
4
5import org.expeditee.items.Permission;
6
7public class Overlay {
8 public Frame Frame;
9
10 public Permission permission;
11
12 public Overlay(Frame overlay, Permission level) {
13 Frame = overlay;
14 permission = level;
15 }
16
17 @Override
18 public boolean equals(Object o) {
19 if (o == null || o.getClass() != Overlay.class)
20 return false;
21
22 return ((Overlay) o).Frame == Frame;
23 }
24
25 @Override
26 public int hashCode() {
27 return 0;
28 }
29
30 public static Overlay getOverlay(Collection<Overlay>overlays, Frame frame){
31 // Check the frame is in the list of overlays
32 for (Overlay o : overlays) {
33 if (o.Frame.equals(frame)) {
34 return o;
35 }
36 }
37 return null;
38 }
39}
Note: See TracBrowser for help on using the repository browser.