Generated by
JDiff

com.itextpdf.io.util Documentation Differences

This file contains all the changes in documentation in the package com.itextpdf.io.util as colored differences. Deletions are shown like this , and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a tag will cause all subsequent paragraphs to be displayed differently.

Class HashCode

This class is a convenience method to sequentially calculate hash code of the object based on the field values. The result depends on the order of elements appended. The exact formula is the same as for java.util.List.hashCode. If you need order independent hash code just summate, multiply or XOR all elements.

Suppose we have class:


 class Thing {
     long id;
     String name;
     float weight;
 }
 
The hash code calculation can be expressed in 2 forms.

For maximum performance:


 public int hashCode() {
     int hashCode = HashCode.EMPTY_HASH_CODE;
     hashCode = HashCode.combine(hashCode, id);
     hashCode = HashCode.combine(hashCode, name);
     hashCode = HashCode.combine(hashCode, weight);
     return hashCode;
 }
 

For convenience:


 public int hashCode() {
     return new HashCode().append(id).append(name).append(weight).hashCode();
 }
 
@see java.util.List#hashCode()

Class IntHashtable

A hash map that uses primitive ints for the key rather than objects.

Note that this class is for internal optimization purposes only, and may not be supported in future releases of Jakarta Commons Lang. Utilities of this sort may be included in future releases of Jakarta Commons Collections. @author Justin Couch @author Alex Chaffee (alex@apache.org) @author Stephen Colebourne @author Bruno Lowagie (change Objects as keys into int values) @author Paulo Soares (added extra methods)


Class IntHashtable.Entry

Innerclass that acts as a datastructure to create a new entry in the table.

Class IntHashtable, constructor IntHashtable()

Constructs a new, empty hashtable with a default capacity and load factor, which is 20 and 0.75 respectively.
Class IntHashtable, constructor IntHashtable(int)

Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75. @param initialCapacity the initial capacity of the hashtable. @throws IllegalArgumentException if the initial capacity is less than zero.
Class IntHashtable, constructor IntHashtable(int, float)

Constructs a new, empty hashtable with the specified initial capacity and the specified load factor. @param initialCapacity the initial capacity of the hashtable. @param loadFactor the load factor of the hashtable. @throws IllegalArgumentException if the initial capacity is less than zero, or if the load factor is nonpositive.
Class IntHashtable, void clear()

Clears this hashtable so that it contains no keys.
Class IntHashtable, boolean contains(int)

Tests if some key maps into the specified value in this hashtable. This operation is more expensive than the containsKey method.

Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework). @param value a value to search for. @return true if and only if some key maps to the value argument in this hashtable as determined by the equals method; false otherwise. @throws NullPointerException if the value is null. @see #containsKey(int) @see #containsValue(int) @see java.util.Map

Class IntHashtable, boolean containsKey(int)

Tests if the specified int is a key in this hashtable. @param key possible key. @return true if and only if the specified int is a key in this hashtable, as determined by the equals method; false otherwise. @see #contains(int)
Class IntHashtable, boolean containsValue(int)

Returns true if this HashMap maps one or more keys to this value.

Note that this method is identical in functionality to contains (which predates the Map interface). @param value value whose presence in this HashMap is to be tested. @return boolean true if the value is contained @see java.util.Map

Class IntHashtable, int get(int)

Returns the value to which the specified key is mapped in this map. @param key a key in the hashtable. @return the value to which the key is mapped in this hashtable; 0 if the key is not mapped to any value in this hashtable. @see #put(int, int)
Class IntHashtable, boolean isEmpty()

Tests if this hashtable maps no keys to values. @return true if this hashtable maps no keys to values; false otherwise.
Class IntHashtable, int put(int, int)

Maps the specified key to the specified value in this hashtable. The key cannot be null.

The value can be retrieved by calling the get method with a key that is equal to the original key. @param key the hashtable key. @param value the value. @return the previous value of the specified key in this hashtable, or null if it did not have one. @throws NullPointerException if the key is null. @see #get(int)

Class IntHashtable, void rehash()

Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently.

This method is called automatically when the number of keys in the hashtable exceeds this hashtable's capacity and load factor.

Class IntHashtable, int remove(int)

Removes the key (and its corresponding value) from this hashtable.

This method does nothing if the key is not present in the hashtable. @param key the key that needs to be removed. @return the value to which the key had been mapped in this hashtable, or null if the key did not have a mapping.

Class IntHashtable, int size()

Returns the number of keys in this hashtable. @return the number of keys in this hashtable.