タグ

2016年1月4日のブックマーク (2件)

  • JapanGov Official Gateway App. - Google Play の Android アプリ

    This is an official app called "JapanGov" made by the Government of Japan. Through electric magazines, HTML contents and social media of the government, we offer a variety of information including charms and strengths of Japan such as politics, culture and geography. With "JapanGov" app, you can find out more about Japan!

    JapanGov Official Gateway App. - Google Play の Android アプリ
    ytRino
    ytRino 2016/01/04
    ダウンロードする前からいたるところが微妙だ…/ 本家サイト:http://www.japan.go.jp/japangov/index.html
  • 定数を型安全に利用する -詳解 IntDef , StringDef- - Qiita

    概要 enumの代わりにstatic finalな定数を使うと、メモリを節約できるが型安全でなくなるというデメリットがある。 これを解決する手段として@IntDefや@StringDefがある。 単純な使い方はネットにあふれているが、RetentionPolicyの設定やflagsについては情報がまとまっていなかったりするのでここで体系的に記載しておきたい。 導入(enum vs static final定数) メモリの削減のためにenumじゃなくてstatic finalな定数を使おうぜ!っていう話をよく耳にする。 公式には、二倍以上もメモリの使用量が違うとのこと。 Managing Your App's Memory Enums often require more than twice as much memory as static constants. You should st

    定数を型安全に利用する -詳解 IntDef , StringDef- - Qiita
    ytRino
    ytRino 2016/01/04
    コンパイルエラーではない(lintで止められるということ?)しRUNTIMEを指定したからといって実行時チェックが入るわけじゃないし全く型安全ではない、という認識だけど違ったかな... IntDef好きだけど