org.seasar.doma.domain
クラス StringDomain<D extends StringDomain<D>>

java.lang.Object
  上位を拡張 org.seasar.doma.domain.AbstractDomain<V,D>
      上位を拡張 org.seasar.doma.domain.AbstractComparableDomain<String,D>
          上位を拡張 org.seasar.doma.domain.StringDomain<D>
型パラメータ:
D - ドメインの型
すべての実装されたインタフェース:
Serializable, CharSequence, Comparable<D>, ComparableDomain<String,D>, Domain<String,D>, SerializableDomain<String,D>
直系の既知のサブクラス:
BuiltinStringDomain

public abstract class StringDomain<D extends StringDomain<D>>
extends AbstractComparableDomain<String,D>
implements CharSequence, SerializableDomain<String,D>

String を値の型とするドメインの骨格実装です。

作成者:
taedium
関連項目:
直列化された形式

フィールドの概要
 
クラス org.seasar.doma.domain.AbstractDomain から継承されたフィールド
changed, value, valueClass
 
コンストラクタの概要
protected StringDomain()
          デフォルトの値でインスタンス化します。
protected StringDomain(String value)
          値を指定してインスタンス化します。
 
メソッドの概要
<R,P,TH extends Throwable>
R
accept(DomainVisitor<R,P,TH> visitor, P p)
          ビジターを受け入れます。
 char charAt(int index)
          ドメインの値から、指定されたインデックス位置にある char 値を返します
 boolean contains(CharSequence s)
          ドメインの値が文字シーケンスを含んでいる場合 true を返します。
 boolean endsWith(String suffix)
          ドメインの値がサフィックスで終わっている場合 true を返します。
 boolean equals(Object o)
           
 int hashCode()
           
 boolean isEmpty()
          ドメインの値が空文字の場合 true を返します。
 int length()
          ドメインの値の長さを返します。
 boolean matches(String regex)
          ドメインの値が正規表現にマッチした場合に true を返します。
 boolean startsWith(String prefix)
          ドメインの値がプレフィックスで始まっている場合 true を返します。
 CharSequence subSequence(int start, int end)
          ドメインの値のサブシーケンスである新規文字シーケンスを返します
 String toString()
           
 
クラス org.seasar.doma.domain.AbstractComparableDomain から継承されたメソッド
assertComparable, assertComparable, compareTo, compareToInternal, eq, eq, ge, ge, gt, gt, le, le, lt, lt
 
クラス org.seasar.doma.domain.AbstractDomain から継承されたメソッド
get, getValueClass, isChanged, isNull, set, setChanged, setDomain, setInternal, setNull
 
クラス java.lang.Object から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
インタフェース org.seasar.doma.domain.Domain から継承されたメソッド
get, getValueClass, isChanged, isNull, set, setChanged, setDomain
 

コンストラクタの詳細

StringDomain

protected StringDomain()
デフォルトの値でインスタンス化します。


StringDomain

protected StringDomain(String value)
値を指定してインスタンス化します。

パラメータ:
value - 値
メソッドの詳細

accept

public <R,P,TH extends Throwable> R accept(DomainVisitor<R,P,TH> visitor,
                                           P p)
         throws TH extends Throwable
インタフェース Domain の記述:
ビジターを受け入れます。

定義:
インタフェース Domain<String,D extends StringDomain<D>> 内の accept
型パラメータ:
R - 戻り値の型
P - パラメータの型
TH - 例外の型
パラメータ:
visitor - ビジター
p - パラメータ
戻り値:
戻り値
例外:
TH - 例外
TH extends Throwable

isEmpty

public boolean isEmpty()
                throws DomainIllegalStateException
ドメインの値が空文字の場合 true を返します。

戻り値:
空文字の場合 true
例外:
DomainIllegalStateException - ドメインの値が null の場合

startsWith

public boolean startsWith(String prefix)
                   throws DomainIllegalStateException
ドメインの値がプレフィックスで始まっている場合 true を返します。

パラメータ:
prefix - プレフィックス
戻り値:
プレフィックスで始まっている場合 true
例外:
DomainIllegalStateException - ドメインの値が null の場合

endsWith

public boolean endsWith(String suffix)
                 throws DomainIllegalStateException
ドメインの値がサフィックスで終わっている場合 true を返します。

パラメータ:
suffix - サフィックス
戻り値:
サフィックスで終わっている場合 true
例外:
DomainIllegalStateException - ドメインの値が null の場合

length

public int length()
           throws DomainIllegalStateException
ドメインの値の長さを返します。

定義:
インタフェース CharSequence 内の length
戻り値:
長さ
例外:
DomainIllegalStateException - ドメインの値が null の場合

matches

public boolean matches(String regex)
                throws DomainIllegalStateException
ドメインの値が正規表現にマッチした場合に true を返します。

パラメータ:
regex - 正規表現
戻り値:
正規表現にマッチした場合に true
例外:
DomainIllegalStateException - ドメインの値が null の場合
PatternSyntaxException - 正規表現の構文が無効な場合

contains

public boolean contains(CharSequence s)
                 throws DomainIllegalStateException
ドメインの値が文字シーケンスを含んでいる場合 true を返します。

パラメータ:
s - 文字シーケンス
戻り値:
文字シーケンス含んでいる場合 true
例外:
DomainIllegalStateException - ドメインの値が null の場合
NullPointerException - 文字シーケンスが null の場合

charAt

public char charAt(int index)
            throws DomainIllegalStateException
ドメインの値から、指定されたインデックス位置にある char 値を返します

定義:
インタフェース CharSequence 内の charAt
パラメータ:
index - インデックス
戻り値:
指定されたインデックス位置にある char
例外:
DomainIllegalStateException - ドメインの値が null の場合
IndexOutOfBoundsException - インデックスが負の値、またはドメインの値の長さ以上である場合

subSequence

public CharSequence subSequence(int start,
                                int end)
                         throws DomainIllegalStateException
ドメインの値のサブシーケンスである新規文字シーケンスを返します

定義:
インタフェース CharSequence 内の subSequence
例外:
DomainIllegalStateException - ドメインの値が null の場合
IndexOutOfBoundsException - start または end が負の値の場合、end の値が ドメインの値の長さ より大きい場合、start の値が end よりも大きい場合

equals

public boolean equals(Object o)
オーバーライド:
クラス Object 内の equals

hashCode

public int hashCode()
オーバーライド:
クラス Object 内の hashCode

toString

public String toString()
定義:
インタフェース CharSequence 内の toString
オーバーライド:
クラス AbstractDomain<String,D extends StringDomain<D>> 内の toString


Copyright © 2009 The Seasar Foundation. All Rights Reserved.