zoukankan      html  css  js  c++  java
  • 轻量级UML工具-UMLet

    免费、开源,而且灰常好用的工具,这里就当加一个备注。免得忘了

    如何在UMLet中表示static和final?

    UMLet中表示static用下划线(对于method、function或者operation也用下划线代表static),个人感觉可以用斜体来表示final(对于method、function或者operation斜体代表abstract),如图

    代码如下:

    rball::BulletGenerator
    --
    -bullet: Sphere
    -bulletSize: float
    -bulletCollisionShape: SphereCollisionShape
    // 用下划线表示static,用斜体表示final
    /_-DEFAULT_initSpeeds: float[]_/
    -initSpeed: float
    -initSpeedIndex: int
    
    -cam: Camera
    -mat: Material
    -rootNode: Node
    -bulletAppState: BulletAppState
    --
    +BulletGenerator(
        cam: Camera
        mat: Material
        rootNode: Node
        bulletAppState: BulletAppState): BulletGenerator
    --
    ~getInitSpeed(): float
    ~nextInitSpeed(): void
    ~previousInitSpeed(): void
    ~launchBullet(): void
    -getPhysicsSpace(): PhysicsSpace

     再如图:

    代码:

    /SimpleApplication/
    --
    /+simpleInitApp(): void/
    +simpleUpdate(tpf: float): void
    +simpleRender(rm: RenderManager): void
    rball::GameMain
    --
    ~bulletGenerator: BulletGenerator
    ~matBullet: Material
    
    -bulletSpeedText: BitmapText
    ~bulletSpeedTextListener BulletSpeedTextListener
    
    ~positionBallGenerator: BallGenerator
    ~randomBallGenerator: BallGenerator
    
    ~terrain: TerrainQuad
    ~matRock: Material
    ~matWire: Material
    
    ~wireframe: boolean
    
    #hintText: BitmapText
    
    -bulletAppState: BulletAppState
    --
    _+main(args: String[])_
    +setupKeys()
    +simpleInitApp()
    +simpleUpdate(tpf: float)
    
    -initCrossHairs()
    -loadHintText()
    -loadBulletSpeedText()
    
    -getWorldIntersection(): Vector3f
    -isInRadius(x: float, y: float, radius: float): boolean
    -calculateHeight(radius: float, heightFactor: float, x: float, z: float): float
    -adjustHeight(loc: Vector3f, radius: float, height: float)

    UML类图中可见性(参考这里):

      public: +

      protected: #

      private: -

      package: ~

    类图中,如果function的返回值为void怎么处理?

    不要画为function(): void,直接画为function()即可

  • 相关阅读:
    第六章 Realm及相关对象(四) PrincipalCollection
    Java消息中间件的概述与JMS规范
    什么是红黑树?
    Mybatis逆向工程的pojo实现序列化接口的代码
    关于 Java 中 finally 语句块的深度辨析
    一道字符串变量对比值是否相等题
    java-网络编程
    java. io 流
    java.io.File 类的常用的方法
    list集合排序的两种方法
  • 原文地址:https://www.cnblogs.com/qrlozte/p/4161495.html
Copyright © 2011-2022 走看看