|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A sequence is a type of function that maps an integer (usually representing an ordering) to
an object.
Example: S = { (1,fred), (2,tom), (3,mary) } is a valid sequence.
| Method Summary | |
void |
add(Seqlet s)
Adds a maplet to this relation. |
boolean |
containsKey(int key)
A convenience function for the alternative domain().contains(new Integer(key)). |
Sequence |
front()
Returns a sequence being all but the last element in the sequence. |
Seqlet |
getSeqlet(int key)
Returns the maplet that a given key participates in. |
Object |
head()
Returns the first element in the sequence. |
Object |
last()
Returns the last element in the sequence. |
Sequence |
tail()
Returns a sequence being all but the first element in the sequence. |
| Methods inherited from interface org.zedlib.Function |
containsKey, containsValue, getMaplet, put |
| Methods inherited from interface org.zedlib.Relation |
add, add, addAll, composition, domain, domainAntiRestriction, domainRestriction, image, inverse, isFunction, isInjection, isReflexive, override, range, rangeAntiRestriction, rangeRestriction, transitiveClosure |
| Methods inherited from interface org.zedlib.Set |
cartesianProduct, difference, identity, intersection, isSubsetOf, isSupersetOf, union |
| Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
public Object head()
public Sequence tail()
public Object last()
public Sequence front()
public Seqlet getSeqlet(int key)
key - the key with which to obtain its corresponding value
public boolean containsKey(int key)
domain().contains(new Integer(key)).
key - the key to check
true if the key is contained in the domain of
this functionRelation.domain()public void add(Seqlet s)
s - the seqlet to add to this sequenceSet.add(Object o)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||