|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.isi.stella.Stella_Object
edu.isi.stella.StandardObject
edu.isi.stella.AbstractCollection
edu.isi.stella.Collection
edu.isi.stella.Sequence
edu.isi.stella.List
edu.isi.stella.Set
public class Set
| Field Summary |
|---|
| Fields inherited from class edu.isi.stella.List |
|---|
theConsList |
| Constructor Summary | |
|---|---|
Set()
|
|
| Method Summary | |
|---|---|
List |
concatenate(List set2,
Cons othersets)
Union set2 and all othersets onto the end of set1. |
int |
equalHashCode()
Return an equalP hash code for self. |
void |
insert(Stella_Object value)
Add value to the set self unless it is already a member. |
void |
insertLast(Stella_Object value)
Add value to the end of set self unless it is already a member. |
static Set |
newSet()
|
boolean |
noDuplicatesP()
Return true if the collection self forbids duplicate values. |
boolean |
objectEqualP(Stella_Object y)
Return TRUE iff x and y are SET's with equivalent members. |
boolean |
orderedP()
Return true if the collection self is ordered. |
Surrogate |
primaryType()
Returns the primary type of self. |
void |
printObject(java.io.PrintStream stream)
|
void |
push(Stella_Object value)
Add value to the front of set self unless it is already a member. |
Collection |
removeDuplicates()
Destructively remove duplicates from self and return the result. |
List |
substitute(Stella_Object renamed_New,
Stella_Object old)
Destructively replace old with renamed_New in the set self
unless renamed_New is already a member. |
| Methods inherited from class edu.isi.stella.List |
|---|
accessListSlotValue, allocateDestructiveListIterator, allocateIterator, butLast, clear, clOutputSystemClStructsFile, computeFileUnitsModule, consify, copy, cppSortUnitsForHeaderFile, createDerivedList, definedListP, difference, ejectDemon, emptyP, equivalentSetsP, extractStartupFunctionUnits, fifth, fifthSetter, first, firstSetter, fourth, fourthSetter, helpPrintContextTree, injectDemon, insertNew, intersection, last, lastPosition, length, list, listify, mapNullToNilList, memberP, membP, newList, nonEmptyP, nth, nthSetter, nullListP, pop, position, prepend, remove, removeDeletedMembers, removeDuplicatesEqual, removeIf, rest, reverse, second, secondSetter, sort, sortClStructClasses, subsetP, subtract, terminateListP, third, thirdSetter, union |
| Methods inherited from class edu.isi.stella.Sequence |
|---|
sequence, yieldConsListFromSequence |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Set()
| Method Detail |
|---|
public static Set newSet()
public int equalHashCode()
equalP hash code for self. Note that this
is O(N) in the number of elements of self.
equalHashCode in class Listpublic boolean objectEqualP(Stella_Object y)
x and y are SET's with equivalent members.
Uses equalP to test equality of elements. This is more general than
equivalentSetsP, since that only uses an eqlP test.
objectEqualP in class Listy -
public List concatenate(List set2,
Cons othersets)
set2 and all othersets onto the end of set1.
The operation is destructive wrt set1, but leaves all other sets intact.
The two mandatory parameters allow us to optimize the common binary case by
not relying on the somewhat less efficient variable arguments mechanism.
concatenate in class Listset2 - othersets -
public List substitute(Stella_Object renamed_New,
Stella_Object old)
old with renamed_New in the set self
unless renamed_New is already a member.
substitute in class Listrenamed_New - old -
public Collection removeDuplicates()
Listself and return the result.
Preserves the original order of the remaining members.
removeDuplicates in class Listpublic void insertLast(Stella_Object value)
value to the end of set self unless it is already a member.
insertLast in class Listvalue - public void push(Stella_Object value)
value to the front of set self unless it is already a member.
push in class Listvalue - public void insert(Stella_Object value)
value to the set self unless it is already a member.
insert in class Listvalue - public boolean orderedP()
Collectiontrue if the collection self is ordered.
orderedP in class Sequencepublic boolean noDuplicatesP()
Collectiontrue if the collection self forbids duplicate values.
noDuplicatesP in class Collectionpublic void printObject(java.io.PrintStream stream)
printObject in class Listpublic Surrogate primaryType()
Stella_Objectself.
Gets defined automatically for every non-abstract subclass of OBJECT.
primaryType in class List
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||