Skip to content

Commit

Permalink
added some java specific methods - toJava,setValue and hashCode
Browse files Browse the repository at this point in the history
  • Loading branch information
deep110 committed Apr 10, 2017
1 parent 385d368 commit 7e9697a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions python/common/org/python/types/FrozenSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
public class FrozenSet extends org.python.types.Object {
public java.util.Set<org.python.Object> value;

/**
* A utility method to update the internal value of this object.
*
* Used by __i*__ operations to do an in-place operation.
* obj must be of type org.python.types.Set
*/
void setValue(org.python.Object obj) {
this.value = ((org.python.types.FrozenSet) obj).value;
}

public java.lang.Object toJava() {
return this.value;
}

public int hashCode() {
return this.value.hashCode();
}

@org.python.Method(
__doc__ = "frozenset() -> empty frozenset object" +
"frozenset(iterable) -> frozenset object\n" +
Expand Down

0 comments on commit 7e9697a

Please sign in to comment.