Java Code Examples for com.helger.commons.hashcode.HashCodeGenerator#getHashCode()

The following examples show how to use com.helger.commons.hashcode.HashCodeGenerator#getHashCode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Matrix.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode ()
{
  final HashCodeGenerator aHC = new HashCodeGenerator (this).append (m_nRows).append (m_nCols);
  for (int nRow = 0; nRow < m_nRows; ++nRow)
    aHC.append (m_aData[nRow]);
  return aHC.getHashCode ();
}
 
Example 2
Source File: MatrixInt.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode ()
{
  final HashCodeGenerator aHC = new HashCodeGenerator (this).append (m_nRows).append (m_nCols);
  for (int nRow = 0; nRow < m_nRows; ++nRow)
    aHC.append (m_aData[nRow]);
  return aHC.getHashCode ();
}
 
Example 3
Source File: SingleError.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode ()
{
  final HashCodeGenerator aHCG = new HashCodeGenerator (this).append (m_aErrorLevel)
                                                             .append (m_sErrorID)
                                                             .append (m_sErrorFieldName)
                                                             .append (m_aErrorLocation)
                                                             .append (m_aErrorText);
  hashCodeLinkedException (aHCG, m_aLinkedException);
  return aHCG.getHashCode ();
}
 
Example 4
Source File: LRUMap.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode ()
{
  // Special case because base implementation is a bit bogus
  final HashCodeGenerator aHCG = new HashCodeGenerator (this).append (m_nMaxSize);
  for (final Map.Entry <KEYTYPE, VALUETYPE> aEntry : entrySet ())
    aHCG.append (aEntry.getKey ()).append (aEntry.getValue ());
  return aHCG.getHashCode ();
}
 
Example 5
Source File: AttributeContainerConcurrent.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode ()
{
  final HashCodeGenerator aGen = new HashCodeGenerator (this);
  for (final Map.Entry <KEYTYPE, VALUETYPE> aEntry : entrySet ())
    aGen.append (aEntry.getKey ()).append (aEntry.getValue ());
  return aGen.getHashCode ();
}
 
Example 6
Source File: AttributeContainer.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode ()
{
  final HashCodeGenerator aGen = new HashCodeGenerator (this);
  for (final Map.Entry <KEYTYPE, VALUETYPE> aEntry : entrySet ())
    aGen.append (aEntry.getKey ()).append (aEntry.getValue ());
  return aGen.getHashCode ();
}