cb.petal.QuiduObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.crazybeans Show documentation
Show all versions of org.crazybeans Show documentation
Java library to read, modify or create Rational Rose petal files
The newest version!
/**
* Copyright (c) 2001 Markus Dahm
* Copyright (C) 2015-2018 BITPlan GmbH http://www.bitplan.com
*
* This source is part of
* https://github.com/BITPlan/CrazyBeans
* and the license as outlined there applies
*/
package cb.petal;
import java.util.*;
/**
* Super class for all quid objects that also have a quidu property
* defined.
*
* @version $Id: QuiduObject.java,v 1.5 2001/06/22 09:10:36 dahm Exp $
* @author M. Dahm
*/
public abstract class QuiduObject extends QuidObject implements HasQuidu {
protected QuiduObject(PetalNode parent, String name, Collection params) {
super(parent, name, params);
}
protected QuiduObject(String name) {
super(name);
}
static String getQuidu(HasQuidu obj) {
return PetalObject.getPropertyAsString((PetalObject)obj, "quidu");
}
public void setQuidu(String quid) {
defineProperty("quidu", quid);
}
public String getQuidu() {
return getQuidu(this);
}
public long getQuiduAsLong() {
return Long.parseLong(getQuidu(), 16);
}
public void setQuiduAsLong(long quid) {
defineProperty("quidu", Long.toHexString(quid).toUpperCase());
}
public final QuidObject getReferencedObject() {
return getRoot().getReferencedObject(this);
}
}