Top Fields Constructors Methods
org.python.core

public Class PyFrozenSet

extends BaseSet
Class Inheritance
Known Direct Subclasses
org.python.core.PyFrozenSetDerived
Annotations
@ExposedType
name:frozenset
base:PyObject
doc:frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements.
Imports
java.util.Collection, .HashSet, .Iterator, org.python.expose.ExposedMethod, .ExposedNew, .ExposedType, .MethodType

Field Summary

Modifier and TypeField and Description
public static final PyType
Inherited from org.python.core.BaseSet:
_set

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
add(Object
element to be added to this set
o
)

Overrides org.python.core.BaseSet.add.

Implements java.util.Set.add.

Adds the specified element to this set if it is not already present (optional operation).

public boolean
addAll(Collection<E>
collection containing elements to be added to this set
c
)

Overrides org.python.core.BaseSet.addAll.

Implements java.util.Set.addAll.

Adds all of the elements in the specified collection to this set if they're not already present (optional operation).

public void
clear()

Overrides org.python.core.BaseSet.clear.

Implements java.util.Set.clear.

Removes all of the elements from this set (optional operation).

pack-priv final PyObject
pack-priv final PyObject
pack-priv final boolean
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final int
pack-priv final PyObject
pack-priv final PyObject
pack-priv final int
pack-priv final PyObject
pack-priv final PyObject
public static PyObject
frozenset___new__(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final String
pack-priv final PyObject
public int
hashCode()

Implements abstract org.python.core.BaseSet.hashCode.

Implements java.util.Set.hashCode.

The hashCode of the set.

public Iterator<E>
iterator()

Overrides org.python.core.BaseSet.iterator.

Implements java.util.Set.iterator.

Returns an iterator over the elements in this set.

public boolean
remove(Object
object to be removed from this set, if present
o
)

Overrides org.python.core.BaseSet.remove.

Implements java.util.Set.remove.

Removes the specified element from this set if it is present (optional operation).

public boolean
removeAll(Collection<E>
collection containing elements to be removed from this set
c
)

Overrides org.python.core.BaseSet.removeAll.

Implements java.util.Set.removeAll.

Removes from this set all of its elements that are contained in the specified collection (optional operation).

public boolean
retainAll(Collection<E>
collection containing elements to be retained in this set
c
)

Overrides org.python.core.BaseSet.retainAll.

Implements java.util.Set.retainAll.

Retains only the elements in this set that are contained in the specified collection (optional operation).

Inherited from org.python.core.BaseSet:
__and____cmp____contains____eq____ge____gt____iter____le____len____lt____ne____nonzero____or____reduce____sub____xor___update_update_update_updateasBaseSetasFrozenbaseset___and__baseset___cmp__baseset___contains__baseset___eq__baseset___ge__baseset___gt__baseset___iter__baseset___le__baseset___len__baseset___lt__baseset___ne__baseset___or__baseset___reduce__baseset___sub__baseset___xor__baseset_copybaseset_differencebaseset_differencebaseset_intersectionbaseset_intersectionbaseset_isdisjointbaseset_issubsetbaseset_issupersetbaseset_symmetric_differencebaseset_toStringbaseset_unionbaseset_unioncontainscontainsAlldifferencegetSetisEmptymakeNewSetmakeNewSetrefersDirectlyTosizesymmetric_differencetoArraytoArraytoStringtraverse

Field Detail

TYPEback to summary
public static final PyType TYPE

Hides org.python.core.PyObject.TYPE.

Constructor Detail

PyFrozenSetback to summary
public PyFrozenSet()
PyFrozenSetback to summary
public PyFrozenSet(PyObject data)
PyFrozenSetback to summary
public PyFrozenSet(PyType type, PyObject data)

Method Detail

addback to summary
public boolean add(Object o)

Overrides org.python.core.BaseSet.add.

Implements java.util.Set.add.

Doc from java.util.Set.add.

Adds the specified element to this set if it is not already present (optional operation). More formally, adds the specified element e to this set if the set contains no element e2 such that Objects.equals(e, e2). If this set already contains the element, the call leaves the set unchanged and returns false. In combination with the restriction on constructors, this ensures that sets never contain duplicate elements.

The stipulation above does not imply that sets must accept all elements; sets may refuse to add any particular element, including null, and throw an exception, as described in the specification for Collection.add. Individual set implementations should clearly document any restrictions on the elements that they may contain.

Parameters
o:Object

element to be added to this set

Returns:boolean

true if this set did not already contain the specified element

addAllback to summary
public boolean addAll(Collection<E> c)

Overrides org.python.core.BaseSet.addAll.

Implements java.util.Set.addAll.

Doc from java.util.Set.addAll.

Adds all of the elements in the specified collection to this set if they're not already present (optional operation). If the specified collection is also a set, the addAll operation effectively modifies this set so that its value is the union of the two sets. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress.

Parameters
c:Collection<E>

collection containing elements to be added to this set

Returns:boolean

true if this set changed as a result of the call

clearback to summary
public void clear()

Overrides org.python.core.BaseSet.clear.

Implements java.util.Set.clear.

Doc from java.util.Set.clear.

Removes all of the elements from this set (optional operation). The set will be empty after this call returns.

frozenset___and__back to summary
pack-priv final PyObject frozenset___and__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__and__(y) <==> x&y
frozenset___cmp__back to summary
pack-priv final PyObject frozenset___cmp__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__cmp__(y) <==> cmp(x,y)
frozenset___contains__back to summary
pack-priv final boolean frozenset___contains__(PyObject item)
Annotations
@ExposedMethod
doc:x.__contains__(y) <==> y in x.
frozenset___eq__back to summary
pack-priv final PyObject frozenset___eq__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__eq__(y) <==> x==y
frozenset___ge__back to summary
pack-priv final PyObject frozenset___ge__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__ge__(y) <==> x>=y
frozenset___gt__back to summary
pack-priv final PyObject frozenset___gt__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__gt__(y) <==> x>y
frozenset___hash__back to summary
pack-priv final int frozenset___hash__()
Annotations
@ExposedMethod
doc:x.__hash__() <==> hash(x)
frozenset___iter__back to summary
pack-priv final PyObject frozenset___iter__()
Annotations
@ExposedMethod
doc:x.__iter__() <==> iter(x)
frozenset___le__back to summary
pack-priv final PyObject frozenset___le__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__le__(y) <==> x<=y
frozenset___len__back to summary
pack-priv final int frozenset___len__()
Annotations
@ExposedMethod
doc:x.__len__() <==> len(x)
frozenset___lt__back to summary
pack-priv final PyObject frozenset___lt__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__lt__(y) <==> x
frozenset___ne__back to summary
pack-priv final PyObject frozenset___ne__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__ne__(y) <==> x!=y
frozenset___new__back to summary
public static PyObject frozenset___new__(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
Annotations
@ExposedNew
frozenset___or__back to summary
pack-priv final PyObject frozenset___or__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__or__(y) <==> x|y
frozenset___reduce__back to summary
pack-priv final PyObject frozenset___reduce__()
Annotations
@ExposedMethod
doc:Return state information for pickling.
frozenset___sub__back to summary
pack-priv final PyObject frozenset___sub__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__sub__(y) <==> x-y
frozenset___xor__back to summary
pack-priv final PyObject frozenset___xor__(PyObject o)
Annotations
@ExposedMethod
type:BINARY
doc:x.__xor__(y) <==> x^y
frozenset_copyback to summary
pack-priv final PyObject frozenset_copy()
Annotations
@ExposedMethod
doc:Return a shallow copy of a set.
frozenset_differenceback to summary
pack-priv final PyObject frozenset_difference(PyObject[] args, String[] kws)
Annotations
@ExposedMethod
doc:Return the difference of two or more sets as a new set. (i.e. all elements that are in this set but not the others.)
frozenset_intersectionback to summary
pack-priv final PyObject frozenset_intersection(PyObject[] args, String[] kws)
Annotations
@ExposedMethod
doc:Return the intersection of two or more sets as a new set. (i.e. elements that are common to all of the sets.)
frozenset_isdisjointback to summary
pack-priv final PyObject frozenset_isdisjoint(PyObject set)
Annotations
@ExposedMethod
doc:Return True if two sets have a null intersection.
frozenset_issubsetback to summary
pack-priv final PyObject frozenset_issubset(PyObject set)
Annotations
@ExposedMethod
doc:Report whether another set contains this set.
frozenset_issupersetback to summary
pack-priv final PyObject frozenset_issuperset(PyObject set)
Annotations
@ExposedMethod
doc:Report whether this set contains another set.
frozenset_symmetric_differenceback to summary
pack-priv final PyObject frozenset_symmetric_difference(PyObject set)
Annotations
@ExposedMethod
doc:Return the symmetric difference of two sets as a new set. (i.e. all elements that are in exactly one of the sets.)
frozenset_toStringback to summary
pack-priv final String frozenset_toString()
Annotations
@ExposedMethod
names:__repr__
doc:x.__repr__() <==> repr(x)
frozenset_unionback to summary
pack-priv final PyObject frozenset_union(PyObject[] args, String[] kws)
Annotations
@ExposedMethod
doc:Return the union of sets as a new set. (i.e. all elements that are in either set.)
hashCodeback to summary
public int hashCode()

Implements abstract org.python.core.BaseSet.hashCode.

Implements java.util.Set.hashCode.

Doc from org.python.core.BaseSet.hashCode.

The hashCode of the set. Only immutable instances can be hashed.

Returns:int

The hashCode of the set.

iteratorback to summary
public Iterator<E> iterator()

Overrides org.python.core.BaseSet.iterator.

Implements java.util.Set.iterator.

Doc from java.util.Set.iterator.

Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).

Returns:Iterator<E>

an iterator over the elements in this set

removeback to summary
public boolean remove(Object o)

Overrides org.python.core.BaseSet.remove.

Implements java.util.Set.remove.

Doc from java.util.Set.remove.

Removes the specified element from this set if it is present (optional operation). More formally, removes an element e such that Objects.equals(o, e), if this set contains such an element. Returns true if this set contained the element (or equivalently, if this set changed as a result of the call). (This set will not contain the element once the call returns.)

Parameters
o:Object

object to be removed from this set, if present

Returns:boolean

true if this set contained the specified element

removeAllback to summary
public boolean removeAll(Collection<E> c)

Overrides org.python.core.BaseSet.removeAll.

Implements java.util.Set.removeAll.

Doc from java.util.Set.removeAll.

Removes from this set all of its elements that are contained in the specified collection (optional operation). If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets.

Parameters
c:Collection<E>

collection containing elements to be removed from this set

Returns:boolean

true if this set changed as a result of the call

retainAllback to summary
public boolean retainAll(Collection<E> c)

Overrides org.python.core.BaseSet.retainAll.

Implements java.util.Set.retainAll.

Doc from java.util.Set.retainAll.

Retains only the elements in this set that are contained in the specified collection (optional operation). In other words, removes from this set all of its elements that are not contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the intersection of the two sets.

Parameters
c:Collection<E>

collection containing elements to be retained in this set

Returns:boolean

true if this set changed as a result of the call