Class ModelEntityImpl

  • All Implemented Interfaces:
    ModelEntity

    public class ModelEntityImpl
    extends java.lang.Object
    implements ModelEntity
    Entity as a component of a model.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelEntityImpl​(Entity entity, java.lang.String fileName)
      Creates a model entity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Entity getEntity()
      Gets the entity.
      java.io.File getFile()
      Gets the model file.
      java.lang.String getFileName()
      Gets the filename.
      boolean hasChanged()
      Returns whether the modelfile has changed.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ModelEntityImpl

        public ModelEntityImpl​(Entity entity,
                               java.lang.String fileName)
                        throws ModelException
        Creates a model entity.
        Parameters:
        entity - the entity
        fileName - the modelfile's filename
        Throws:
        ModelException - if file does not exist or is not a regular file
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFileName

        public java.lang.String getFileName()
        Gets the filename.
        Specified by:
        getFileName in interface ModelEntity
        Returns:
        the filename
      • getFile

        public java.io.File getFile()
        Gets the model file.
        Returns:
        the file
      • hasChanged

        public boolean hasChanged()
        Returns whether the modelfile has changed.
        Specified by:
        hasChanged in interface ModelEntity
        Returns:
        true if changed