1 / 10

便利なクラスを大紹介!

便利なクラスを大紹介!. この子達を、ぜひ、使ってください!. Properties の IF 拡張. java.util.Properties に便利なインタフェースを追加 数値変換 真偽値判定 例外処理を書かなくて済む→便利!. jp.co.intra_mart.common.aid.jdk.java.util .ExtendedProperties. XML のデータ入力. XML のデータを入力する java.util.Porperties のインタフェースで利用できる キー名は XPath のルールを踏襲 設定ファイルを扱うのに最適.

rozene
Download Presentation

便利なクラスを大紹介!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 便利なクラスを大紹介! この子達を、ぜひ、使ってください!

  2. PropertiesのIF拡張 • java.util.Propertiesに便利なインタフェースを追加 • 数値変換 • 真偽値判定 • 例外処理を書かなくて済む→便利! jp.co.intra_mart.common.aid.jdk.java.util.ExtendedProperties

  3. XMLのデータ入力 • XMLのデータを入力する • java.util.Porpertiesのインタフェースで利用できる • キー名はXPathのルールを踏襲 • 設定ファイルを扱うのに最適 jp.co.intra_mart.common.aid.jdk.javax.xml.XMLProperties

  4. パッケージ名について • 「jp.co.intra_mart.common.aid.jdk.」は、プレフィックスとして共通 • プレフィックス以下は、jdkのパッケージ名と同じ • そのパッケージ内のクラスを拡張したものが含まれる

  5. ResourceBundleのIF変換 • ResourceBundleをjava.util.Propertiesのインタフェースで利用できる jp.co.intra_mart.common.aid.jdk.java.util.ResourceBundleProperties

  6. 部分文字列の置換 • Writerのインタフェースで置換処理 • 文字列→文字列の置換 • 文字は厳密に区別 • 異なる文字数の文字列へ置換可能 • 該当部分をすべて置換 • 何重にもフィルタ処理可能 jp.co.intra_mart.common.aid.jdk.java.io.ReplaceWriter

  7. サイズ固定のMAP • Least Recently Used (LRU) の概念に基づくデータ管理 • マッピングの最大個数は一定 • よく使うデータのマッピングがあれば効率が良い • 最大個数よりも多くのデータを良く使う場合は非効率 • 扱うデータの個数よりも最大値が大きい場合は意味がない jp.co.intra_mart.common.aid.jdk.java.util.FixedSizeMap

  8. エコなMAP • ソフト参照によるマッピングの管理 • キーは強参照 • データ消去のタイミングは予測不能 jp.co.intra_mart.common.aid.jdk.java.util.SoftHashMap

  9. 並び順を制御する • java.util.TreeSetと組み合わせて使う • 独自Comparatorとの併用も可能 jp.co.intra_mart.common.aid.jdk.java.util.MultiComparator jp.co.intra_mart.common.aid.jdk.java.util.ReverseComparator jp.co.intra_mart.common.aid.jdk.java.util.SequenceComparator

  10. その他の便利クラス • jp.co.intra_mart.common.aid.jdk.java.io.ExtendedInputStream • jp.co.intra_mart.common.aid.jdk.java.io.ExtendedOutputStream • jp.co.intra_mart.common.aid.jdk.java.io.file.ExtendedDirectory • jp.co.intra_mart.common.aid.jdk.java.io.file.ExtendedFile • jp.co.intra_mart.common.aid.jdk.java.lang.ResourceLoader • jp.co.intra_mart.common.aid.jsdk.javax.servlet.exception.ExtendedServletException • jp.co.intra_mart.common.aid.jsdk.javax.servlet.filter.AbstractFilter • jp.co.intra_mart.common.platform.vm.CommandLineArgument

More Related