Package com.appiancorp.suiteapi.type
Class NamedTypedValue
java.lang.Object
com.appiancorp.suiteapi.type.TypedValue
com.appiancorp.suiteapi.type.NamedTypedValue
- All Implemented Interfaces:
com.appiancorp.core.expr.portable.PortableNamedTypedValue
,com.appiancorp.core.expr.portable.PortableTypedValue
,DeepCloneable
,JSONable
,JSONCacheable
,com.appiancorp.type.HasTypeRef
,com.appiancorp.type.NamedType
,Serializable
,Cloneable
- Direct Known Subclasses:
TypedVariable
@GwtCompatible
public class NamedTypedValue
extends TypedValue
implements com.appiancorp.type.NamedType, com.appiancorp.core.expr.portable.PortableNamedTypedValue
This is a simple bean that represents a name, type and value.
- See Also:
-
Field Summary
Fields inherited from class com.appiancorp.suiteapi.type.TypedValue
ALWAYS, AT_DESIGNER_DISCRETION, clearPasswordOnTransport, NEVER, TO_STRING_STYLE
Fields inherited from interface com.appiancorp.type.HasTypeRef
selectTypeId
Fields inherited from interface com.appiancorp.suiteapi.common.JSONable
hiddenAttributes$TRANSIENT
Fields inherited from interface com.appiancorp.type.NamedType
selectName
-
Constructor Summary
ConstructorDescriptionNamedTypedValue
(TypedValue tv, String name) NamedTypedValue
(Long instanceType) NamedTypedValue
(String name, Long instanceType) NamedTypedValue
(String name, Long instanceType, Object value) Creates an instance with the given name, type and value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified object with this typedValue for equality.static <T extends NamedTypedValue>
TfindNtvByName
(T[] ntvs, String name) Finds the NamedTypedValue object in the given array that has the given name.static int
findNtvIndexByName
(NamedTypedValue[] ntvs, String name) Finds the index of the NamedTypedValue in the given array that has the given name.getName()
Gets the name.getNtvNames
(Collection<? extends NamedTypedValue> ntvs) Returns the names of the givenNamedTypedValue
s.int
hashCode()
void
Sets the name.toString()
Methods inherited from class com.appiancorp.suiteapi.type.TypedValue
clearPasswordOnTransport, clone, getHiddenAttributes, getInstanceType, getInstanceTypeIds, getTypeRef, getValue, setInstanceType, setTypeRef, setValue
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.appiancorp.type.HasTypeRef
getTypeRef, setTypeRef
Methods inherited from interface com.appiancorp.core.expr.portable.PortableTypedValue
getInstanceType, getValue
-
Field Details
-
QNAME
-
-
Constructor Details
-
NamedTypedValue
public NamedTypedValue() -
NamedTypedValue
-
NamedTypedValue
-
NamedTypedValue
-
NamedTypedValue
-
NamedTypedValue
-
NamedTypedValue
Creates an instance with the given name, type and value.- Parameters:
name
- the nameinstanceType
- the type idvalue
- the value
-
-
Method Details
-
equals
Description copied from class:TypedValue
Compares the specified object with this typedValue for equality. Returns true if and only if the specified object is also a typedValue, both typedValues have the same type, and the same value.- Overrides:
equals
in classTypedValue
- Parameters:
obj
- the object to be compared for equality with this typeValue- Returns:
- true if the specified object is equal to this typeValue
-
hashCode
public int hashCode()- Overrides:
hashCode
in classTypedValue
-
getName
Gets the name.- Specified by:
getName
in interfacecom.appiancorp.type.NamedType
- Specified by:
getName
in interfacecom.appiancorp.core.expr.portable.PortableNamedTypedValue
- Returns:
- the name
-
setName
Sets the name.- Specified by:
setName
in interfacecom.appiancorp.type.NamedType
- Parameters:
name
- the name
-
toString
- Overrides:
toString
in classTypedValue
-
findNtvByName
Finds the NamedTypedValue object in the given array that has the given name. If no such named value can be found, returnsnull
.- Parameters:
ntvs
- the NamedTypedValue array in which to look for the namename
- the name to look for- Returns:
- the NamedTypedValue object that has that name. Null if not found.
-
findNtvIndexByName
Finds the index of the NamedTypedValue in the given array that has the given name. If no such named value can be found, returns-1
.- Parameters:
ntvs
- the NamedTypedValue array in which to look for the namename
- the name to look for- Returns:
- the index of the NamedTypedValue object in the array, -1 if not found.
-
getNtvNames
Returns the names of the givenNamedTypedValue
s. If the given collection has a consistent iteration order, the returned names will be in the same order as the collection items.
-