本文整理汇总了Python中java.util.Collections.unmodifiableSet方法的典型用法代码示例。如果您正苦于以下问题:Python Collections.unmodifiableSet方法的具体用法?Python Collections.unmodifiableSet怎么用?Python Collections.unmodifiableSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.Collections
的用法示例。
在下文中一共展示了Collections.unmodifiableSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from java.util import Collections [as 别名]
# 或者: from java.util.Collections import unmodifiableSet [as 别名]
def __init__(self):
self.speed = 5;
self.speedZoom = .01;
self.m_systemID = HashedString("RTSCameraSystem")
#private final static List<HashedString> usedComponents;
#private final static List<HashedString> optionalComponents;
#private final static Set<HashedString> writeToComponents;
#private final static Set<HashedString> otherComponents;
#private final static Set<HashedString> usedInterfaces;
#private final static Set<HashedString> writeToInterfaces;
components = ArrayList()
components.add(RTSCameraComponent.getComponentStaticType())
self.m_usedComponents = Collections.unmodifiableList(components)
components = ArrayList()
components.add(CameraComponent.getComponentStaticType())
self.m_optionalComponents = Collections.unmodifiableList(components)
writes = HashSet()
writes.add(RTSCameraComponent.getComponentStaticType())
writes.add(CameraComponent.getComponentStaticType())
self.m_writeToComponents = Collections.unmodifiableSet(writes)
self.m_otherComponents = Collections.emptySet()
interfaces = HashSet()
interfaces.add(SystemManager.inputInteface)
self.m_usedInterfaces = Collections.unmodifiableSet(interfaces)
self.m_writeToInterfaces = Collections.unmodifiableSet(HashSet(self.m_usedInterfaces))
示例2: getCompleteTurnSet
# 需要导入模块: from java.util import Collections [as 别名]
# 或者: from java.util.Collections import unmodifiableSet [as 别名]
def getCompleteTurnSet(self):
""" generated source for method getCompleteTurnSet """
if self.completeTurnSet == None:
self.completeTurnSet = HashSet()
while i < self.getNumTurns():
self.completeTurnSet.add(i)
i += 1
self.completeTurnSet = Collections.unmodifiableSet(self.completeTurnSet)
return self.completeTurnSet