001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 2.0.12 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011/** 012 * Representation of attributes on an XML node. 013 <p> 014 * <p style='color: #777; font-style: italic'> 015This class of objects is defined by libSBML only and has no direct 016equivalent in terms of SBML components. This class is not prescribed by 017the SBML specifications, although it is used to implement features 018defined in SBML. 019</p> 020 021 */ 022 023public class XMLAttributes { 024 private long swigCPtr; 025 protected boolean swigCMemOwn; 026 027 protected XMLAttributes(long cPtr, boolean cMemoryOwn) 028 { 029 swigCMemOwn = cMemoryOwn; 030 swigCPtr = cPtr; 031 } 032 033 protected static long getCPtr(XMLAttributes obj) 034 { 035 return (obj == null) ? 0 : obj.swigCPtr; 036 } 037 038 protected static long getCPtrAndDisown (XMLAttributes obj) 039 { 040 long ptr = 0; 041 042 if (obj != null) 043 { 044 ptr = obj.swigCPtr; 045 obj.swigCMemOwn = false; 046 } 047 048 return ptr; 049 } 050 051 protected void finalize() { 052 delete(); 053 } 054 055 public synchronized void delete() { 056 if (swigCPtr != 0) { 057 if (swigCMemOwn) { 058 swigCMemOwn = false; 059 libsbmlJNI.delete_XMLAttributes(swigCPtr); 060 } 061 swigCPtr = 0; 062 } 063 } 064 065 /** 066 * Equality comparison method for XMLAttributes. 067 * <p> 068 * Because the Java methods for libSBML are actually wrappers around code 069 * implemented in C++ and C, certain operations will not behave as 070 * expected. Equality comparison is one such case. An instance of a 071 * libSBML object class is actually a <em>proxy object</em> 072 * wrapping the real underlying C/C++ object. The normal <code>==</code> 073 * equality operator in Java will <em>only compare the Java proxy objects</em>, 074 * not the underlying native object. The result is almost never what you 075 * want in practical situations. Unfortunately, Java does not provide a 076 * way to override <code>==</code>. 077 * <p> 078 * The alternative that must be followed is to use the 079 * <code>equals()</code> method. The <code>equals</code> method on this 080 * class overrides the default java.lang.Object one, and performs an 081 * intelligent comparison of instances of objects of this class. The 082 * result is an assessment of whether two libSBML Java objects are truly 083 * the same underlying native-code objects. 084 * <p> 085 * The use of this method in practice is the same as the use of any other 086 * Java <code>equals</code> method. For example, 087 * <em>a</em><code>.equals(</code><em>b</em><code>)</code> returns 088 * <code>true</code> if <em>a</em> and <em>b</em> are references to the 089 * same underlying object. 090 * 091 * @param sb a reference to an object to which the current object 092 * instance will be compared 093 * 094 * @return <code>true</code> if <code>sb</code> refers to the same underlying 095 * native object as this one, <code>false</code> otherwise 096 */ 097 public boolean equals(Object sb) 098 { 099 if ( this == sb ) 100 { 101 return true; 102 } 103 return swigCPtr == getCPtr((XMLAttributes)(sb)); 104 } 105 106 /** 107 * Returns a hashcode for this XMLAttributes object. 108 * 109 * @return a hash code usable by Java methods that need them. 110 */ 111 public int hashCode() 112 { 113 return (int)(swigCPtr^(swigCPtr>>>32)); 114 } 115 116 117/** 118 * Creates a new empty {@link XMLAttributes} set. 119 */ public 120 XMLAttributes() throws org.sbml.libsbml.XMLConstructorException { 121 this(libsbmlJNI.new_XMLAttributes__SWIG_0(), true); 122 } 123 124 125/** 126 * Copy constructor; creates a copy of this {@link XMLAttributes} set. 127 <p> 128 * <code>orig</code> the {@link XMLAttributes} object to copy. 129 <p> 130 * @throws XMLConstructorException 131 * Thrown if the argument <code>orig</code> is <code>null.</code> 132 */ public 133 XMLAttributes(XMLAttributes orig) throws org.sbml.libsbml.XMLConstructorException { 134 this(libsbmlJNI.new_XMLAttributes__SWIG_1(XMLAttributes.getCPtr(orig), orig), true); 135 } 136 137 138/** 139 * Creates and returns a deep copy of this {@link XMLAttributes} set. 140 <p> 141 * @return a (deep) copy of this {@link XMLAttributes} set. 142 */ public 143 XMLAttributes cloneObject() { 144 long cPtr = libsbmlJNI.XMLAttributes_cloneObject(swigCPtr, this); 145 return (cPtr == 0) ? null : new XMLAttributes(cPtr, true); 146 } 147 148 149/** 150 * Adds an attribute (a name/value pair) to this {@link XMLAttributes} object, 151 * optionally with a prefix and URI defining a namespace. 152 <p> 153 * @param name a string, the local name of the attribute. 154 * @param value a string, the value of the attribute. 155 * @param namespaceURI a string, the namespace URI of the attribute. 156 * @param prefix a string, the prefix of the namespace 157 <p> 158 * @return an integer code indicating the success or failure of the 159 * function. The possible values returned by this 160 * function are: 161 * <ul> 162 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 163 * 164 * </ul> <p> 165 * @note if local name with the same namespace URI already exists in this 166 * attribute set, its value and prefix will be replaced. 167 <p> 168 * 169</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 170The native C++ implementation of this method defines a default argument 171value. In the documentation generated for different libSBML language 172bindings, you may or may not see corresponding arguments in the method 173declarations. For example, in Java and C#, a default argument is handled by 174declaring two separate methods, with one of them having the argument and 175the other one lacking the argument. However, the libSBML documentation will 176be <em>identical</em> for both methods. Consequently, if you are reading 177this and do not see an argument even though one is described, please look 178for descriptions of other variants of this method near where this one 179appears in the documentation. 180</dd></dl> 181 182 */ public 183 int add(String name, String value, String namespaceURI, String prefix) { 184 return libsbmlJNI.XMLAttributes_add__SWIG_0(swigCPtr, this, name, value, namespaceURI, prefix); 185 } 186 187 188/** 189 * Adds an attribute (a name/value pair) to this {@link XMLAttributes} object, 190 * optionally with a prefix and URI defining a namespace. 191 <p> 192 * @param name a string, the local name of the attribute. 193 * @param value a string, the value of the attribute. 194 * @param namespaceURI a string, the namespace URI of the attribute. 195 * @param prefix a string, the prefix of the namespace 196 <p> 197 * @return an integer code indicating the success or failure of the 198 * function. The possible values returned by this 199 * function are: 200 * <ul> 201 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 202 * 203 * </ul> <p> 204 * @note if local name with the same namespace URI already exists in this 205 * attribute set, its value and prefix will be replaced. 206 <p> 207 * 208</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 209The native C++ implementation of this method defines a default argument 210value. In the documentation generated for different libSBML language 211bindings, you may or may not see corresponding arguments in the method 212declarations. For example, in Java and C#, a default argument is handled by 213declaring two separate methods, with one of them having the argument and 214the other one lacking the argument. However, the libSBML documentation will 215be <em>identical</em> for both methods. Consequently, if you are reading 216this and do not see an argument even though one is described, please look 217for descriptions of other variants of this method near where this one 218appears in the documentation. 219</dd></dl> 220 221 */ public 222 int add(String name, String value, String namespaceURI) { 223 return libsbmlJNI.XMLAttributes_add__SWIG_1(swigCPtr, this, name, value, namespaceURI); 224 } 225 226 227/** 228 * Adds an attribute (a name/value pair) to this {@link XMLAttributes} object, 229 * optionally with a prefix and URI defining a namespace. 230 <p> 231 * @param name a string, the local name of the attribute. 232 * @param value a string, the value of the attribute. 233 * @param namespaceURI a string, the namespace URI of the attribute. 234 * @param prefix a string, the prefix of the namespace 235 <p> 236 * @return an integer code indicating the success or failure of the 237 * function. The possible values returned by this 238 * function are: 239 * <ul> 240 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 241 * 242 * </ul> <p> 243 * @note if local name with the same namespace URI already exists in this 244 * attribute set, its value and prefix will be replaced. 245 <p> 246 * 247</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd> 248The native C++ implementation of this method defines a default argument 249value. In the documentation generated for different libSBML language 250bindings, you may or may not see corresponding arguments in the method 251declarations. For example, in Java and C#, a default argument is handled by 252declaring two separate methods, with one of them having the argument and 253the other one lacking the argument. However, the libSBML documentation will 254be <em>identical</em> for both methods. Consequently, if you are reading 255this and do not see an argument even though one is described, please look 256for descriptions of other variants of this method near where this one 257appears in the documentation. 258</dd></dl> 259 260 */ public 261 int add(String name, String value) { 262 return libsbmlJNI.XMLAttributes_add__SWIG_2(swigCPtr, this, name, value); 263 } 264 265 266/** 267 * Adds an attribute with the given {@link XMLTriple}/value pair to this {@link XMLAttributes} set. 268 <p> 269 * @note if local name with the same namespace URI already exists in this attribute set, 270 * its value and prefix will be replaced. 271 <p> 272 * @param triple an {@link XMLTriple}, the XML triple of the attribute. 273 * @param value a string, the value of the attribute. 274 <p> 275 * @return integer value indicating success/failure of the 276 * function. The possible values 277 * returned by this function are: 278 * <ul> 279 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 280 * </ul> 281 */ public 282 int add(XMLTriple triple, String value) { 283 return libsbmlJNI.XMLAttributes_add__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple, value); 284 } 285 286 287/** 288 * Removes an attribute with the given index from this {@link XMLAttributes} set. 289 <p> 290 * @param n an integer the index of the resource to be deleted 291 * @return integer value indicating success/failure of the 292 * function. The possible values 293 * returned by this function are: 294 * <ul> 295 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 296 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 297 * </ul> 298 */ public 299 int removeResource(int n) { 300 return libsbmlJNI.XMLAttributes_removeResource(swigCPtr, this, n); 301 } 302 303 304/** 305 * Removes an attribute with the given index from this {@link XMLAttributes} set. 306 * (This function is an alias of {@link XMLAttributes#removeResource(int n)} ). 307 <p> 308 * @param n an integer the index of the resource to be deleted 309 <p> 310 * @return integer value indicating success/failure of the 311 * function. The possible values 312 * returned by this function are: 313 * <ul> 314 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 315 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 316 * </ul> 317 */ public 318 int remove(int n) { 319 return libsbmlJNI.XMLAttributes_remove__SWIG_0(swigCPtr, this, n); 320 } 321 322 323/** 324 * Removes an attribute with the given local name and namespace URI from 325 * this {@link XMLAttributes} set. 326 <p> 327 * @param name a string, the local name of the attribute. 328 * @param uri a string, the namespace URI of the attribute. 329 <p> 330 * @return integer value indicating success/failure of the 331 * function. The possible values 332 * returned by this function are: 333 * <ul> 334 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 335 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 336 * </ul> 337 */ public 338 int remove(String name, String uri) { 339 return libsbmlJNI.XMLAttributes_remove__SWIG_1(swigCPtr, this, name, uri); 340 } 341 342 343/** 344 * Removes an attribute with the given local name and namespace URI from 345 * this {@link XMLAttributes} set. 346 <p> 347 * @param name a string, the local name of the attribute. 348 * @param uri a string, the namespace URI of the attribute. 349 <p> 350 * @return integer value indicating success/failure of the 351 * function. The possible values 352 * returned by this function are: 353 * <ul> 354 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 355 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 356 * </ul> 357 */ public 358 int remove(String name) { 359 return libsbmlJNI.XMLAttributes_remove__SWIG_2(swigCPtr, this, name); 360 } 361 362 363/** 364 * Removes an attribute with the given {@link XMLTriple} from this {@link XMLAttributes} set. 365 <p> 366 * @param triple an {@link XMLTriple}, the XML triple of the attribute. 367 <p> 368 * @return integer value indicating success/failure of the 369 * function. The possible values 370 * returned by this function are: 371 * <ul> 372 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 373 * <li> {@link libsbmlConstants#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE } 374 * </ul> 375 */ public 376 int remove(XMLTriple triple) { 377 return libsbmlJNI.XMLAttributes_remove__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 378 } 379 380 381/** 382 * Clears (deletes) all attributes in this {@link XMLAttributes} object. 383 <p> 384 * @return integer value indicating success/failure of the 385 * function. The possible values 386 * returned by this function are: 387 * <ul> 388 * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS } 389 * </ul> 390 */ public 391 int clear() { 392 return libsbmlJNI.XMLAttributes_clear(swigCPtr, this); 393 } 394 395 396/** 397 * Return the index of an attribute with the given name. 398 <p> 399 * @note A namespace bound to the name is not checked by this function. 400 * Thus, if there are multiple attributes with the given local name and 401 * different namespaces, the smallest index among those attributes will 402 * be returned. {@link XMLAttributes#getIndex(String name, String uri)} const or 403 * {@link XMLAttributes#getIndex(XMLTriple triple)} const should be used to get an index of an 404 * attribute with the given local name and namespace. 405 <p> 406 * @param name a string, the local name of the attribute for which the 407 * index is required. 408 <p> 409 * @return the index of an attribute with the given local name, or -1 if not present. 410 */ public 411 int getIndex(String name) { 412 return libsbmlJNI.XMLAttributes_getIndex__SWIG_0(swigCPtr, this, name); 413 } 414 415 416/** 417 * Return the index of an attribute with the given local name and namespace URI. 418 <p> 419 * @param name a string, the local name of the attribute. 420 * @param uri a string, the namespace URI of the attribute. 421 <p> 422 * @return the index of an attribute with the given local name and namespace URI, 423 * or -1 if not present. 424 */ public 425 int getIndex(String name, String uri) { 426 return libsbmlJNI.XMLAttributes_getIndex__SWIG_1(swigCPtr, this, name, uri); 427 } 428 429 430/** 431 * Return the index of an attribute with the given {@link XMLTriple}. 432 <p> 433 * @param triple an {@link XMLTriple}, the XML triple of the attribute for which 434 * the index is required. 435 <p> 436 * @return the index of an attribute with the given {@link XMLTriple}, or -1 if not present. 437 */ public 438 int getIndex(XMLTriple triple) { 439 return libsbmlJNI.XMLAttributes_getIndex__SWIG_2(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 440 } 441 442 443/** 444 * Return the number of attributes in the set. 445 <p> 446 * @return the number of attributes in this {@link XMLAttributes} set. 447 */ public 448 int getLength() { 449 return libsbmlJNI.XMLAttributes_getLength(swigCPtr, this); 450 } 451 452 453/** 454 * Return the number of attributes in the set. 455 <p> 456 * @return the number of attributes in this {@link XMLAttributes} set. 457 <p> 458 * This function is an alias for getLength introduced for consistency 459 * with other XML classes. 460 */ public 461 int getNumAttributes() { 462 return libsbmlJNI.XMLAttributes_getNumAttributes(swigCPtr, this); 463 } 464 465 466/** 467 * Return the local name of an attribute in this {@link XMLAttributes} set (by position). 468 <p> 469 * @param index an integer, the position of the attribute whose local name is 470 * required. 471 <p> 472 * @return the local name of an attribute in this list (by position). 473 <p> 474 * @note If index is out of range, an empty string will be returned. Use 475 * {@link XMLAttributes#hasAttribute(int index)} const to test for the attribute 476 * existence. 477 */ public 478 String getName(int index) { 479 return libsbmlJNI.XMLAttributes_getName(swigCPtr, this, index); 480 } 481 482 483/** 484 * Return the prefix of an attribute in this {@link XMLAttributes} set (by position). 485 <p> 486 * @param index an integer, the position of the attribute whose prefix is 487 * required. 488 <p> 489 * @return the namespace prefix of an attribute in this list (by 490 * position). 491 <p> 492 * @note If index is out of range, an empty string will be returned. Use 493 * {@link XMLAttributes#hasAttribute(int index)} const to test for the attribute 494 * existence. 495 */ public 496 String getPrefix(int index) { 497 return libsbmlJNI.XMLAttributes_getPrefix(swigCPtr, this, index); 498 } 499 500 501/** 502 * Return the prefixed name of an attribute in this {@link XMLAttributes} set (by position). 503 <p> 504 * @param index an integer, the position of the attribute whose prefixed 505 * name is required. 506 <p> 507 * @return the prefixed name of an attribute in this list (by 508 * position). 509 <p> 510 * @note If index is out of range, an empty string will be returned. Use 511 * {@link XMLAttributes#hasAttribute(int index)} const to test for attribute existence. 512 */ public 513 String getPrefixedName(int index) { 514 return libsbmlJNI.XMLAttributes_getPrefixedName(swigCPtr, this, index); 515 } 516 517 518/** 519 * Return the namespace URI of an attribute in this {@link XMLAttributes} set (by position). 520 <p> 521 * @param index an integer, the position of the attribute whose namespace URI is 522 * required. 523 <p> 524 * @return the namespace URI of an attribute in this list (by position). 525 <p> 526 * @note If index is out of range, an empty string will be returned. Use 527 * {@link XMLAttributes#hasAttribute(int index)} const to test for attribute existence. 528 */ public 529 String getURI(int index) { 530 return libsbmlJNI.XMLAttributes_getURI(swigCPtr, this, index); 531 } 532 533 534/** 535 * Return the value of an attribute in this {@link XMLAttributes} set (by position). 536 <p> 537 * @param index an integer, the position of the attribute whose value is 538 * required. 539 <p> 540 * @return the value of an attribute in the list (by position). 541 <p> 542 * @note If index is out of range, an empty string will be returned. Use 543 * {@link XMLAttributes#hasAttribute(int index)} const to test for attribute existence. 544 */ public 545 String getValue(int index) { 546 return libsbmlJNI.XMLAttributes_getValue__SWIG_0(swigCPtr, this, index); 547 } 548 549 550/** 551 * Return an attribute's value by name. 552 <p> 553 * @param name a string, the local name of the attribute whose value is required. 554 <p> 555 * @return The attribute value as a string. 556 <p> 557 * @note If an attribute with the given local name does not exist, an 558 * empty string will be returned. Use 559 * {@link XMLAttributes#hasAttribute(String name, String uri)} const 560 * to test for attribute existence. A namespace bound to the local name 561 * is not checked by this function. Thus, if there are multiple 562 * attributes with the given local name and different namespaces, the 563 * value of an attribute with the smallest index among those attributes 564 * will be returned. {@link XMLAttributes#getValue(String name)} const or 565 * {@link XMLAttributes#getValue(XMLTriple triple)} const should be used to get a value of an 566 * attribute with the given local name and namespace. 567 */ public 568 String getValue(String name) { 569 return libsbmlJNI.XMLAttributes_getValue__SWIG_1(swigCPtr, this, name); 570 } 571 572 573/** 574 * Return a value of an attribute with the given local name and namespace URI. 575 <p> 576 * @param name a string, the local name of the attribute whose value is required. 577 * @param uri a string, the namespace URI of the attribute. 578 <p> 579 * @return The attribute value as a string. 580 <p> 581 * @note If an attribute with the given local name and namespace URI does 582 * not exist, an empty string will be returned. Use 583 * {@link XMLAttributes#hasAttribute(String name, String uri)} const 584 * to test for attribute existence. 585 */ public 586 String getValue(String name, String uri) { 587 return libsbmlJNI.XMLAttributes_getValue__SWIG_2(swigCPtr, this, name, uri); 588 } 589 590 591/** 592 * Return a value of an attribute with the given {@link XMLTriple}. 593 <p> 594 * @param triple an {@link XMLTriple}, the XML triple of the attribute whose 595 * value is required. 596 <p> 597 * @return The attribute value as a string. 598 <p> 599 * @note If an attribute with the given {@link XMLTriple} does not exist, an 600 * empty string will be returned. Use 601 * {@link XMLAttributes#hasAttribute(XMLTriple triple)} const to test for attribute existence. 602 */ public 603 String getValue(XMLTriple triple) { 604 return libsbmlJNI.XMLAttributes_getValue__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 605 } 606 607 608/** 609 * Predicate returning <code>true</code> or <code>false</code> depending on whether 610 * an attribute with the given index exists in this {@link XMLAttributes}. 611 <p> 612 * @param index an integer, the position of the attribute. 613 <p> 614 * @return <code>true</code> if an attribute with the given index exists in this 615 * {@link XMLAttributes}, <code>false</code> otherwise. 616 */ public 617 boolean hasAttribute(int index) { 618 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_0(swigCPtr, this, index); 619 } 620 621 622/** 623 * Predicate returning <code>true</code> or <code>false</code> depending on whether 624 * an attribute with the given local name and namespace URI exists in this 625 * {@link XMLAttributes}. 626 <p> 627 * @param name a string, the local name of the attribute. 628 * @param uri a string, the namespace URI of the attribute. 629 <p> 630 * @return <code>true</code> if an attribute with the given local name and namespace 631 * URI exists in this {@link XMLAttributes}, <code>false</code> otherwise. 632 */ public 633 boolean hasAttribute(String name, String uri) { 634 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_1(swigCPtr, this, name, uri); 635 } 636 637 638/** 639 * Predicate returning <code>true</code> or <code>false</code> depending on whether 640 * an attribute with the given local name and namespace URI exists in this 641 * {@link XMLAttributes}. 642 <p> 643 * @param name a string, the local name of the attribute. 644 * @param uri a string, the namespace URI of the attribute. 645 <p> 646 * @return <code>true</code> if an attribute with the given local name and namespace 647 * URI exists in this {@link XMLAttributes}, <code>false</code> otherwise. 648 */ public 649 boolean hasAttribute(String name) { 650 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_2(swigCPtr, this, name); 651 } 652 653 654/** 655 * Predicate returning <code>true</code> or <code>false</code> depending on whether 656 * an attribute with the given XML triple exists in this {@link XMLAttributes}. 657 <p> 658 * @param triple an {@link XMLTriple}, the XML triple of the attribute 659 <p> 660 * @return <code>true</code> if an attribute with the given XML triple exists in this 661 * {@link XMLAttributes}, <code>false</code> otherwise. 662 */ public 663 boolean hasAttribute(XMLTriple triple) { 664 return libsbmlJNI.XMLAttributes_hasAttribute__SWIG_3(swigCPtr, this, XMLTriple.getCPtr(triple), triple); 665 } 666 667 668/** 669 * Predicate returning <code>true</code> or <code>false</code> depending on whether 670 * this {@link XMLAttributes} set is empty. 671 <p> 672 * @return <code>true</code> if this {@link XMLAttributes} set is empty, <code>false</code> otherwise. 673 */ public 674 boolean isEmpty() { 675 return libsbmlJNI.XMLAttributes_isEmpty(swigCPtr, this); 676 } 677 678}