Package net.sf.gridarta.model.data
Class AbstractNamedObject
- java.lang.Object
-
- net.sf.gridarta.model.data.AbstractNamedObject
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<NamedObject>,NamedObject
- Direct Known Subclasses:
DefaultAnimationObject,DefaultFaceObject
public abstract class AbstractNamedObject extends java.lang.Object implements NamedObject
AnAbstractNamedObjecthas a name and tree position source and provides an icon for display.AbstractNamedObjectis the super class ofFaceObjectandAnimationObject.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractNamedObject(@NotNull java.lang.String path)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(@NotNull NamedObject o)booleanequals(@Nullable java.lang.Object obj)@NotNull java.lang.StringgetPath()Get the path of this AbstractNamedObject.inthashCode()voidsetPath(@NotNull java.lang.String path)Set the path of this AbstractNamedObject.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.gridarta.model.data.NamedObject
getDisplayIconName, getName
-
-
-
-
Constructor Detail
-
AbstractNamedObject
protected AbstractNamedObject(@NotNull @NotNull java.lang.String path)Creates a new instance.- Parameters:
path- Path- See Also:
getPath(),setPath(String)
-
-
Method Detail
-
getPath
@NotNull public @NotNull java.lang.String getPath()
Description copied from interface:NamedObjectGet the path of this AbstractNamedObject. The path should be of user presentable but 100% machine processable nature. The path must be usable for creating a tree for this AbstractNamedObject. The path returned by this method does not include the name of the object. The path separator must be "/" independently of the underlying operating system.- Specified by:
getPathin interfaceNamedObject- Returns:
- path of this AbstractNamedObject
- See Also:
NamedObject.setPath(String)
-
setPath
public void setPath(@NotNull @NotNull java.lang.String path)Description copied from interface:NamedObjectSet the path of this AbstractNamedObject.- Specified by:
setPathin interfaceNamedObject- Parameters:
path- new path for this AbstractNamedObject- See Also:
NamedObject.getPath()
-
compareTo
public int compareTo(@NotNull @NotNull NamedObject o)- Specified by:
compareToin interfacejava.lang.Comparable<NamedObject>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(@Nullable @Nullable java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfaceNamedObject- Overrides:
toStringin classjava.lang.Object
-
-