Added method to determine if any field has been modified.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@734 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: FieldMask.java,v 1.1 2002/03/15 01:06:03 mdb Exp $
|
// $Id: FieldMask.java,v 1.2 2002/05/11 20:29:27 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -59,6 +59,20 @@ public class FieldMask
|
|||||||
_modified = new boolean[dcount];
|
_modified = new boolean[dcount];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if any of the fields in this mask are modified.
|
||||||
|
*/
|
||||||
|
public final boolean isModified ()
|
||||||
|
{
|
||||||
|
int mcount = _modified.length;
|
||||||
|
for (int ii = 0; ii < mcount; ii++) {
|
||||||
|
if (_modified[ii]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the field with the specified index is modified.
|
* Returns true if the field with the specified index is modified.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user