JML

org.jmlspecs.models
Class JMLArrayOps

java.lang.Object
  extended byorg.jmlspecs.models.JMLArrayOps

public class JMLArrayOps
extends Object

Array Operations that are useful for specifications.

Version:
$Revision: 1.12 $
Author:
Brandon Shilling, Gary T. Leavens
See Also:
Arrays, JMLObjectSequence, JMLValueSequence

Constructor Summary
JMLArrayOps()
           
 
Method Summary
static boolean hasObjectIdentity(Object[] array, Object element)
          Search the array for the given element and tell if that element's object identity occurs in the array.
static boolean hasObjectIdentity(Object[] array, Object element, int length)
          Search the array for the given element and tell if that element's object identity occurs in the array from 0 the given length-1.
static boolean hasValueEquals(Object[] array, Object element)
          Search the array for the given element and tell if an object with value "equals" to the given element occurs in the array.
static boolean hasValueEquals(Object[] array, Object element, int length)
          Search the array for the given element and tell if an object with value "equals" to the given element occurs in the array from 0 the given length-1.
static int objectIdentityCount(Object[] array, Object element)
          Search the array for the given element and return how many times that element's object identity occurs in the array.
static int objectIdentityCount(Object[] array, Object element, int length)
          Search the array for the given element and return how many times that element's object identity occurs in the array from 0 the given length-1.
static int valueEqualsCount(Object[] array, Object element)
          Search the array for the given element and return how many times an object with value "equals" to the given element occurs in the array.
static int valueEqualsCount(Object[] array, Object element, int length)
          Search the array for the given element and return how many times an object with value "equals" to the given element occurs in the array from 0 the given length-1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMLArrayOps

public JMLArrayOps()
Method Detail

objectIdentityCount

public static int objectIdentityCount(Object[] array,
                                      Object element)
Search the array for the given element and return how many times that element's object identity occurs in the array.

See Also:
objectIdentityCount(Object[], Object, int), hasObjectIdentity(Object[], Object), valueEqualsCount(Object[], Object)

objectIdentityCount

public static int objectIdentityCount(Object[] array,
                                      Object element,
                                      int length)
Search the array for the given element and return how many times that element's object identity occurs in the array from 0 the given length-1.

See Also:
objectIdentityCount(Object[], Object), hasObjectIdentity(Object[], Object, int), valueEqualsCount(Object[], Object, int)

valueEqualsCount

public static int valueEqualsCount(Object[] array,
                                   Object element)
Search the array for the given element and return how many times an object with value "equals" to the given element occurs in the array.

See Also:
valueEqualsCount(Object[], Object, int), hasValueEquals(Object[], Object), objectIdentityCount(Object[], Object)

valueEqualsCount

public static int valueEqualsCount(Object[] array,
                                   Object element,
                                   int length)
Search the array for the given element and return how many times an object with value "equals" to the given element occurs in the array from 0 the given length-1.

See Also:
valueEqualsCount(Object[], Object), hasValueEquals(Object[], Object, int), objectIdentityCount(Object[], Object, int)

hasObjectIdentity

public static boolean hasObjectIdentity(Object[] array,
                                        Object element)
Search the array for the given element and tell if that element's object identity occurs in the array.

See Also:
hasObjectIdentity(Object[], Object, int), objectIdentityCount(Object[], Object), hasValueEquals(Object[], Object)

hasObjectIdentity

public static boolean hasObjectIdentity(Object[] array,
                                        Object element,
                                        int length)
Search the array for the given element and tell if that element's object identity occurs in the array from 0 the given length-1.

See Also:
hasObjectIdentity(Object[], Object), objectIdentityCount(Object[], Object), hasValueEquals(Object[], Object)

hasValueEquals

public static boolean hasValueEquals(Object[] array,
                                     Object element)
Search the array for the given element and tell if an object with value "equals" to the given element occurs in the array.

See Also:
hasValueEquals(Object[], Object, int), valueEqualsCount(Object[], Object), hasObjectIdentity(Object[], Object)

hasValueEquals

public static boolean hasValueEquals(Object[] array,
                                     Object element,
                                     int length)
Search the array for the given element and tell if an object with value "equals" to the given element occurs in the array from 0 the given length-1.

See Also:
hasValueEquals(Object[], Object), valueEqualsCount(Object[], Object, int), hasObjectIdentity(Object[], Object, int)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.