All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.thomsonreuters.ema.access.LongObject Maven / Gradle / Ivy

There is a newer version: 3.5.1.0
Show newest version
///*|-----------------------------------------------------------------------------
// *|            This source code is provided under the Apache 2.0 license      --
// *|  and is provided AS IS with no warranty or guarantee of fit for purpose.  --
// *|                See the project's LICENSE.md for details.                  --
// *|           Copyright (C) 2019 Refinitiv. All rights reserved.            --
///*|-----------------------------------------------------------------------------

package com.thomsonreuters.ema.access;

import com.thomsonreuters.upa.valueadd.common.VaNode;

class LongObject extends VaNode
{
    long _value;
    
    long value()
    {
        return _value;
    }
    
    LongObject value(long value)
    {
        _value = value;
        
        return this;
    }
   
    public int hashCode()
    {
        return (int)(_value ^ (_value >>> 32));
    }
    
    public boolean equals(Object obj)
    {
        if (obj == this)
        {
            return true;
        }
        
        LongObject longObj;
        
        try
        {
        	longObj = (LongObject)obj;
        }
        catch (ClassCastException e)
        {
            return false;
        }
        
        return (longObj._value == _value);
    }

    LongObject clear()
    {
        _value = 0;
        
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy