private struct SlotFilter2 extends array
private static Table array slotId
private static integer slotCount = 0
method operator [] takes integer slot returns integer
if (0 == slotId[this]) then
set slotId[this] = Table.create()
endif
if (not slotId[this].has(slot)) then
set slotCount = slotCount + 1
set slotId[this][slot] = slotCount
endif
return slotId[this][slot]
endmethod
endstruct
private struct SlotFilter extends array
private static Table array slotId
private static integer slotCount = 0
method operator [] takes integer slot returns SlotFilter2
if (0 == slotId[this]) then
set slotId[this] = Table.create()
endif
if (not slotId[this].has(slot)) then
set slotCount = slotCount + 1
set slotId[this][slot] = slotCount
endif
return slotId[this][slot]
endmethod
endstruct