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

Alachisoft.NCache.Common.DataStructures.GroupEnumerationPointer Maven / Gradle / Ivy

package Alachisoft.NCache.Common.DataStructures;

import com.alachisoft.ncache.serialization.core.io.ICompactSerializable;
import com.alachisoft.ncache.serialization.core.io.NCacheObjectInput;
import com.alachisoft.ncache.serialization.core.io.NCacheObjectOutput;

import java.io.IOException;

public class GroupEnumerationPointer extends EnumerationPointer implements ICompactSerializable {
    private String _group;
    private String _subGroup;

    public GroupEnumerationPointer(String group, String subGroup) {
        super();
        _group = group;
        _subGroup = subGroup;
    }

    public GroupEnumerationPointer(String id, int chunkId, String group, String subGroup) {
        super(id, chunkId);
        _group = group;
        _subGroup = subGroup;
    }

    public final String getGroup() {
        return _group;
    }

    public final void setGroup(String value) {
        _group = value;
    }

    public final String getSubGroup() {
        return _subGroup;
    }

    public final void setSubGroup(String value) {
        _subGroup = value;
    }


    @Override
    public boolean isGroupPointer() {
        return true;
    }

    @Override
    public boolean equals(Object obj) {
        boolean equals = false;

        if (obj instanceof GroupEnumerationPointer) {
            GroupEnumerationPointer other = (GroupEnumerationPointer) ((obj instanceof GroupEnumerationPointer) ? obj : null);
            if (super.equals(obj)) {
                equals = _group.equals(other._group) && _subGroup.equals(other._subGroup);
            }
        }

        return equals;
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
    ///#region ICompactSerializable Members

    private void readExternalize(NCacheObjectInput reader) throws IOException {
        //super.Deserialize(reader);
        _group = reader.readUTF();
        _subGroup = reader.readUTF();
    }

    private void writeExternalize(NCacheObjectOutput writer) throws IOException {
        //super.Serialize(writer);
        writer.writeUTF(_group);
        writer.writeUTF(_subGroup);
    }

//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
    ///#endregion
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy