📄 objectid.java
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Core License version 1 published by ozone-db.org.//// The original code and portions created by SMB are// Copyright (C) 1997-2000 by SMB GmbH. All rights reserved.//// $Id: ObjectID.java,v 1.17 2000/10/28 16:55:16 daniela Exp $package org.ozoneDB.core;import java.io.*;import org.ozoneDB.DxLib.*;public class ObjectID extends DxObject implements Externalizable { final static long serialVersionUID = 2; final static byte subSerialVersionUID = 1; private long value = -1; public ObjectID() { } public ObjectID( long v ) { value = v; } public long value() { return value; } public final int hashCode() { //wenn diese 32 bits keinen unterschied mehr bringen, //wird mit equals() weiter verglichen return (int)value; } public final boolean equals( Object obj ) { if (obj instanceof ObjectID) { return value == ((ObjectID)obj).value; } return false; } public final boolean isLess( DxCompatible obj ) { if (obj instanceof ObjectID) { return value < ((ObjectID)obj).value; } return false; } public Object clone() { return new ObjectID( value ); } public void writeExternal( ObjectOutput out ) throws IOException { // env.logWriter.newEntry ("write: " + getClass().toString() + " " + value, LogWriter.DEBUG); out.writeByte( subSerialVersionUID ); out.writeLong( value ); } public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { byte streamVersionUID = in.readByte(); value = in.readLong(); // env.logWriter.newEntry ("read: " + getClass().toString() + " " + value, LogWriter.DEBUG); } /** * The value of the ObjectID as String. DO not change this, the name * of the cluster files depend on it. */ public String toString() { return String.valueOf( value ); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -