|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.models.JMLListValueNode
org.jmlspecs.models.JMLObjectBagEntryNode
Internal class used in the implementation of JMLObjectBag.
JMLObjectBag,
JMLObjectBagEntry,
JMLListValueNode| Field Summary | |
JMLListValueNode |
next
The next node in this list. |
JMLType |
val
An `equational' specification of lists, for use in the invariant. |
| Constructor Summary | |
JMLObjectBagEntryNode(JMLObjectBagEntry entry,
JMLObjectBagEntryNode nxt)
The type of the elements contained in the entries in this list. |
|
| Method Summary | |
JMLListValueNode |
append(JMLType item)
Return a list that consists of this list and the given element. |
Object |
clone()
Return a clone of this object. |
JMLListValueNode |
concat(JMLListValueNode ls2)
Return a list that is the concatenation of this with the given lists. |
static JMLObjectBagEntryNode |
cons(JMLObjectBagEntry hd,
JMLObjectBagEntryNode tl)
Return a JMLObjectBagEntryNode containing the given entry followed by the given list. |
static JMLListValueNode |
cons(JMLType hd,
JMLListValueNode tl)
Return a JMLListValueNode containing the given element followed by the given list. |
boolean |
equals(Object ls2)
Test whether this object's value is equal to the given argument. |
JMLType |
getItem(JMLType item)
Return the zero-based index of the first occurrence of the given element in the list, if there is one |
boolean |
has(JMLType item)
Tells whether the given element is ".equals" to an element in the list. |
int |
hashCode()
Return a hash code for this object. |
JMLType |
head()
Return the first element in this list. |
boolean |
headEquals(JMLType item)
Tell if the head of the list is ".equals" to the given item. |
int |
indexOf(JMLType item)
Return the zero-based index of the first occurrence of the given element in the list, if there is one |
JMLListValueNode |
insertBefore(int n,
JMLType item)
Return a list that is like this list but with the given item inserted before the given index. |
int |
int_length()
Tells the number of elements in the list; a synonym for size. |
int |
int_size()
Tells the number of elements in the sequence; a synonym for length Tells the number of elements in the sequence; a synonym for length Tells the number of elements in the list; a synonym for length. |
boolean |
isPrefixOf(JMLListValueNode ls2)
Tells whether the elements of this list occur, in order, at the beginning of the given list, using ".equals" for comparisons. |
JMLType |
itemAt(int i)
Return the ith element of a list. |
JMLType |
last()
Return the last element in this list. |
JMLListValueNode |
prefix(int n)
Return a list containing the first n elements in this list. |
JMLListValueNode |
prepend(JMLType item)
Return a list that is like this, but with the given item at the front. |
JMLListValueNode |
remove(JMLType item)
Return a list that is like this list but without the first occurrence of the given item. |
JMLObjectBagEntryNode |
removeBE(JMLObjectBagEntry entry)
Return a list that is like this list but without the first occurrence of the given bag entry. |
JMLListValueNode |
removeItemAt(int n)
Return a list like this list, but without the element at the given zero-based index. |
JMLListValueNode |
removeLast()
Return a list containing all but the last element in this. |
JMLListValueNode |
removePrefix(int n)
Return a list containing all but the first n elements in this list. |
JMLListValueNode |
replaceItemAt(int n,
JMLType item)
Return a list like this, but with item replacing the element at the given zero-based index. |
JMLListValueNode |
reverse()
Return a list that is the reverse of this list. |
String |
toString()
Return a string representation for this list. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public final JMLType val
public final JMLListValueNode next
| Constructor Detail |
public JMLObjectBagEntryNode(JMLObjectBagEntry entry,
JMLObjectBagEntryNode nxt)
entry - the JMLObjectBagEntry to place at the head of this list.nxt - the JMLObjectBagEntryNode to make the tail of this list.cons(org.jmlspecs.models.JMLObjectBagEntry, org.jmlspecs.models.JMLObjectBagEntryNode)| Method Detail |
public static JMLObjectBagEntryNode cons(JMLObjectBagEntry hd,
JMLObjectBagEntryNode tl)
hd - the JMLObjectBagEntry to place at the head of the result.tl - the JMLObjectBagEntryNode to make the tail of the result.JMLObjectBagEntryNode(org.jmlspecs.models.JMLObjectBagEntry, org.jmlspecs.models.JMLObjectBagEntryNode)public Object clone()
clone in interface JMLValueTypeclone in class JMLListValueNodepublic JMLObjectBagEntryNode removeBE(JMLObjectBagEntry entry)
public static JMLListValueNode cons(JMLType hd,
JMLListValueNode tl)
hd - the value to place at the head of the result.tl - the JMLListValueNode to make the tail of the result.public JMLType head()
public boolean headEquals(JMLType item)
JMLListValueNode.has(JMLType)
public JMLType itemAt(int i)
throws JMLListException
JMLListExceptionReturn the ith element of a list.,
#getItem(int)public int int_size()
public int int_length()
public boolean has(JMLType item)
public boolean isPrefixOf(JMLListValueNode ls2)
public boolean equals(Object ls2)
equals in interface JMLValueTypeequals in class Objectpublic int hashCode()
hashCode in interface JMLTypehashCode in class Objectpublic int indexOf(JMLType item)
item - the JMLType sought in this.
public JMLType last()
public JMLType getItem(JMLType item)
throws JMLListException
item - the JMLType sought in this list.
JMLListException - if the item does not occur in this list.JMLListValueNode.itemAt(int)public JMLListValueNode prefix(int n)
n - the number of elements to leave in the result.
public JMLListValueNode removePrefix(int n)
n - the number of elements to remove
public JMLListValueNode removeItemAt(int n)
n - the zero-based index into the list.
public JMLListValueNode replaceItemAt(int n,
JMLType item)
n - the zero-based index into this list.item - the item to put at index index
Return a list like this, but with item replacing the element at the
given zero-based index.public JMLListValueNode removeLast()
public JMLListValueNode concat(JMLListValueNode ls2)
ls2 - the list to place at the end of this list in the
result.
public JMLListValueNode prepend(JMLType item)
item - the element to place at the front of the result.public JMLListValueNode append(JMLType item)
public JMLListValueNode reverse()
public JMLListValueNode insertBefore(int n,
JMLType item)
throws JMLListException
JMLListExceptionpublic JMLListValueNode remove(JMLType item)
public String toString()
toString in class Object
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||