ch.panter.li.bi.asn.model
Class AsnFieldImpl

java.lang.Object
  extended by ch.panter.li.bi.asn.model.AsnFieldImpl
All Implemented Interfaces:
AsnField, NamedItem

public final class AsnFieldImpl
extends Object
implements AsnField


Constructor Summary
AsnFieldImpl(String name, AsnTag tag, AsnType type)
           
AsnFieldImpl(String name, AsnType type)
           
 
Method Summary
 void add(AsnConstraint constraint)
           
 boolean equals(Object compare)
           
 ReadOnlyCollection<AsnConstraint> getConstraints()
           
 AsnValue getDefaultValue()
           
 String getName()
           
 AsnTag getTag()
           
 AsnType getType()
           
 boolean hasConstraints()
           
 boolean hasDefaultValue()
           
 int hashCode()
           
 boolean isOptional()
           
 void setDefaultValue(AsnValue defaultValue)
           
 void setOptional(boolean optional)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsnFieldImpl

public AsnFieldImpl(String name,
                    AsnType type)

AsnFieldImpl

public AsnFieldImpl(String name,
                    AsnTag tag,
                    AsnType type)
Method Detail

getName

public final String getName()
Specified by:
getName in interface NamedItem
Returns:
item's name

getTag

public final AsnTag getTag()
Specified by:
getTag in interface AsnField

getType

public final AsnType getType()
Specified by:
getType in interface AsnField

isOptional

public final boolean isOptional()
Specified by:
isOptional in interface AsnField
Returns:
true if the field is either marked OPTIONAL or a DEFAULT value was specified, false for mandatory fields.

setOptional

public final void setOptional(boolean optional)

hasDefaultValue

public final boolean hasDefaultValue()
Specified by:
hasDefaultValue in interface AsnField
Returns:
true if a DEFAULT value was specified, false for mandatory fields or OPTIONAL fields without a DEFAULT value.

getDefaultValue

public final AsnValue getDefaultValue()
Specified by:
getDefaultValue in interface AsnField
Returns:
the DEFAULT value to use in case a value is missing. might be null.

setDefaultValue

public final void setDefaultValue(AsnValue defaultValue)

hasConstraints

public final boolean hasConstraints()
Specified by:
hasConstraints in interface AsnField

getConstraints

public final ReadOnlyCollection<AsnConstraint> getConstraints()
Specified by:
getConstraints in interface AsnField

add

public final void add(AsnConstraint constraint)

equals

public final boolean equals(Object compare)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright 2007-2007 SourceForge. All Rights Reserved.