forked from powerdata/com.powerdata.openpa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGroupList.java
73 lines (62 loc) · 1.45 KB
/
GroupList.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.powerdata.openpa;
import java.util.Collections;
import java.util.Set;
/**
* Anonymous GroupList.
*
* @author [email protected]
*
*/
public class GroupList extends GroupListI<Group>
{
/**
* Create an anonymous GroupList
* @param lists Set of lists used to form groups and provide equipment sublists
* @param busgrp Map from bus to group
*/
public GroupList(PALists lists, BusGrpMap busgrp)
{
super(lists, busgrp);
}
/**
* Create an anonymous GroupList with a set of known keys
* @param lists Set of lists used to form groups and provide equipment sublists
* @param keys Set of keys to assign each group
* @param busgrp Map from bus to group
*/
public GroupList(PALists model, int[] keys, BusGrpMap busgrp)
{
super(model, keys, busgrp);
}
/**
* Return the group at the given index in the list
* @param index Index position in the list
* @return Group object at the index
*/
@Override
public Group get(int index)
{
return new Group(this, index);
}
@Override
public ListMetaType getListMeta()
{
return null;
}
@Override
public boolean objEquals(int ndx, Object obj)
{
BaseObject o = (BaseObject) obj;
return System.identityHashCode(this) == System.identityHashCode(o.getList()) && getKey(ndx) == o.getKey();
}
@Override
public int objHash(int ndx)
{
return System.identityHashCode(this) + getKey(ndx);
}
@Override
public Set<ColumnMeta> getColTypes()
{
return Collections.emptySet();
}
}