net.vvakame.blaz.util
Class KeyUtil

java.lang.Object
  extended by net.vvakame.blaz.util.KeyUtil

public class KeyUtil
extends Object

Key についてのユーティリティ.

Author:
vvakame

Constructor Summary
KeyUtil()
           
 
Method Summary
static List<Key> conv(Iterable<Key> keys)
          Iterable から List に変換します.
static Key createKey(String kind, long id)
          指定のKindとidを表す Key を生成し返す.
static Key createKey(String kind, String name)
          指定のKindとnameを表す Key を生成し返す.
static String keyToString(Key key)
          Key を文字列表現に変換する.
static Key stringToKey(String str)
          Key の文字列表現から Key を復元する.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyUtil

public KeyUtil()
Method Detail

createKey

public static Key createKey(String kind,
                            String name)
指定のKindとnameを表す Key を生成し返す.

Parameters:
kind -
name -
Returns:
生成したKey

createKey

public static Key createKey(String kind,
                            long id)
指定のKindとidを表す Key を生成し返す.

Parameters:
kind -
id -
Returns:
生成したKey

keyToString

public static String keyToString(Key key)
Key を文字列表現に変換する.

Parameters:
key -
Returns:
keyの文字列表現

stringToKey

public static Key stringToKey(String str)
Key の文字列表現から Key を復元する.

Parameters:
str -
Returns:
復元された Key

conv

public static List<Key> conv(Iterable<Key> keys)
Iterable から List に変換します.

Parameters:
keys -
Returns:
List


Copyright © 2012. All Rights Reserved.