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

📄 lock.java

📁 subversion-1.4.3-1.tar.gz 配置svn的源码
💻 JAVA
字号:
/** * @copyright * ==================================================================== * Copyright (c) 2003-2005 CollabNet.  All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution.  The terms * are also available at http://subversion.tigris.org/license-1.html. * If newer versions of this license are posted there, you may use a * newer version instead, at your option. * * This software consists of voluntary contributions made by many * individuals.  For exact contribution history, see the revision * history and logs, available at http://subversion.tigris.org/. * ==================================================================== *  * @endcopyright */package org.tigris.subversion.javahl;import java.util.Date;/** * class to describe a lock. It is return by the lock operation * @since 1.2 */public class Lock{    /**     * the owner of the lock     */    private String owner;    /**     * the path of the locked item     */    private String path;    /**     * the token provided during the lock operation     */    private String token;    /**     * the comment provided during the lock operation     */    private String comment;    /**     * the date when the lock was created     */    private long creationDate;    /**     * the date when the lock will expire     */    private long expirationDate;    /**     * this constructor should only called from JNI code     * @param owner             the owner of the lock     * @param path              the path of the locked item     * @param token             the lock token     * @param comment           the lock comment     * @param creationDate      the date when the lock was created     * @param expirationDate    the date when the lock will expire     */    Lock(String owner, String path, String token, String comment,         long creationDate, long expirationDate)    {        this.owner = owner;        this.path = path;        this.token = token;        this.comment = comment;        this.creationDate = creationDate;        this.expirationDate = expirationDate;    }    /**     * @return the owner of the lock     */    public String getOwner()    {        return owner;    }    /**     * @return the path of the locked item     */    public String getPath()    {        return path;    }    /**     * @return the token provided during the lock operation     */    public String getToken()    {        return token;    }    /**     * @return the comment provided during the lock operation     */    public String getComment()    {        return comment;    }    /**     * @return the date the lock was created     */    public Date getCreationDate()    {        if(creationDate == 0)            return null;        else            return new Date(creationDate/1000);    }    /**     * @return the date when the lock will expire     */    public Date getExpirationDate()    {        if(expirationDate == 0)            return null;        else            return new Date(expirationDate/1000);    }}

⌨️ 快捷键说明

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