⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dxstring.java

📁 用Java写的面相对象的数据库管理系统
💻 JAVA
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Library 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: DxString.java,v 1.6 2000/10/28 16:55:14 daniela Exp $package org.ozoneDB.DxLib;import java.io.*;public class DxString extends DxObject implements Externalizable {        final static long serialVersionUID = 1L;        String value = new String();            public DxString() {        super();    }            public DxString( DxString s ) {        super();        value = new String( s.value );    }            public DxString( String v ) {        super();        value = new String( v );    }            public Object clone() {        return new DxString( value );    }             public boolean equals( String obj ) {        return value.equals( obj );    }             public boolean equals( Object obj ) {        if (this == obj) {            return true;        }         if (obj instanceof DxString && obj != null) {            return value.equals( ((DxString)obj).value );        } else {            return false;        }     }             public boolean isLess( DxCompatible obj ) {        if (this == obj) {            return false;        }         return value.compareTo( ((DxString)obj).value ) < 0;    }             public String toString() {        return value;    }             public int hashCode() {        //die fehlenden bits dann mit equals()        return value.hashCode();    }             public DxString append( DxString s ) {        value += s;        return this;    }             public DxString append( String s ) {        return append( new DxString( s ) );    }             public DxString prepend( DxString s ) {        value = s + value;        return this;    }             public DxString prepend( String s ) {        return prepend( new DxString( s ) );    }             public void insertAt( DxString s, int a ) {        insertAt( s, a, s.length() );    }             public void insertAt( String s, int a ) {        insertAt( new DxString( s ), a, s.length() );    }             public void insertAt( DxString s, int a, int len ) {        String pre = value.substring( 0, a );        String app = value.substring( a, value.length() );        value = pre + s.value.substring( 0, len ) + app;    }             public void insertAt( String s, int a, int len ) {        insertAt( new DxString( s ), a, len );    }             public void deleteAt( int a ) {        deleteAt( a, value.length() - a );    }             public void deleteAt( int a, int len ) {        String pre = value.substring( 0, a );        String app = value.substring( a + len, value.length() );        value = pre + app;    }             public DxString at( int a, int len ) {        return new DxString( value.substring( a, a + len ) );    }             public int length() {        return value.length();    }             public void writeExternal( ObjectOutput out ) throws IOException {        out.writeUTF( value );    }             public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException {        value = in.readUTF();    }     }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -