1c1
< /*--
---
> /*--
7c7
<
---
>
11c11
<
---
>
14c14
<
---
>
16,17c16,17
< notice, this list of conditions, and the disclaimer that follows
< these conditions in the documentation and/or other materials
---
> notice, this list of conditions, and the disclaimer that follows
> these conditions in the documentation and/or other materials
23c23
<
---
>
27,29c27,29
<
< In addition, we request (but do not require) that you include in the
< end-user documentation provided with the redistribution and/or in the
---
>
> In addition, we request (but do not require) that you include in the
> end-user documentation provided with the redistribution and/or in the
33c33
< Alternatively, the acknowledgment may be graphical using the logos
---
> Alternatively, the acknowledgment may be graphical using the logos
49,50c49,50
< This software consists of voluntary contributions made by many
< individuals on behalf of the JDOM Project and was originally
---
> This software consists of voluntary contributions made by many
> individuals on behalf of the JDOM Project and was originally
54c54
<
---
>
58a59
> import java.util.*;
66a68
> * @author Tomislaw 'Cromax' Kitynski
71,72c73
< private static final String CVS_ID =
< "@(#) $RCSfile: ElementFilter.java,v $ $Revision: 1.8 $ $Date: 2003/04/02 01:56:58 $ $Name: jdom_1_0_b9_rc2 $";
---
> //- fields.protected.instance --
79c80,87
<
---
>
> //- fields.private.static --
>
> private static final String CVS_ID =
> "@(#) $RCSfile: ElementFilter.java,v $ $Revision: 1.8 $ $Date: 2003/04/02 01:56:58 $ $Name: jdom_1_0_b9_rc2 $";
>
> //- constructors.public --
>
114,144c122,159
< /**
< * Check to see if the object matches a predefined set of rules.
< *
< * @param obj The object to verify.
< * @return true
if the objected matched a predfined
< * set of rules.
< */
< public boolean matches(Object obj) {
< if (obj instanceof Element) {
< Element element = (Element) obj;
< if (name == null) {
< if (namespace == null) {
< return true;
< }
< else {
< return namespace.equals(element.getNamespace());
< }
< }
< else {
< if (name.equals(element.getName())) {
< if (namespace == null) {
< return true;
< }
< else {
< return namespace.equals(element.getNamespace());
< }
< }
< }
< }
< return false;
< }
---
> //- methods.public.instance --
>
> /**
Check to see if the object matches a predefined set of rules.
> > #author ??? > #author Cromax > #version 1.3, 2004-01-12 > > @param obj > The object to verify. > @return >true
if the objected matched a predfined set of rules.
>
> #history 1.3, Cromax: removed code for attributes matching, just speedup
> #history 1.2, Cromax: Element casting done just once (as in old code)
> #history 1.1, Cromax: added matching against attributes, code cleanup
> */
> public boolean matches(Object obj)
> {
> if (obj instanceof Element)
> {
> Element el = (Element)obj;
>
> //- This means:
> // return
> // obj is-an Element &&
> // obj.matchesName() &&
> // obj.matchesNamespace();
> return
> (this.name == null || this.name.equals(el.getName())) &&
> (this.namespace == null ||
> this.namespace.equals(el.getNamespace()));
> }
>
> return false;
> }
>
> //- methods.public.instance.overriden:Object --
169c184
< }
---
> }
\ Brak znaku nowej linii na ko'ncu pliku