Package ontopoly.model
Class FieldAssignment
java.lang.Object
ontopoly.model.FieldAssignment
Represents a field as assigned to a topic type. The field itself is a
FieldDefinition, and the topic type a TopicType. This object primarily
holds the cardinality and order in the list of fields.
-
Constructor Summary
ConstructorsConstructorDescriptionFieldAssignment(TopicType topicType, TopicType declaredTopicType, FieldDefinition fieldDefinition) Creates a new field assignment object.FieldAssignment(TopicType topicType, TopicType declaredTopicType, FieldDefinition fieldDefinition, int cachedOrder) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the topic type.Returns the field type.intgetOrder()Returns the ordering key of the field on this topic type.intReturns the ordering key of the field on the topic type sent in as an argument.Returns the topic type.inthashCode()voidmoveAfter(FieldAssignment other) Change field order so that this field is ordered directly after the other field.static void
-
Constructor Details
-
FieldAssignment
public FieldAssignment(TopicType topicType, TopicType declaredTopicType, FieldDefinition fieldDefinition) Creates a new field assignment object. -
FieldAssignment
public FieldAssignment(TopicType topicType, TopicType declaredTopicType, FieldDefinition fieldDefinition, int cachedOrder)
-
-
Method Details
-
getTopicType
Returns the topic type. -
getDeclaredTopicType
Returns the topic type. -
getFieldDefinition
Returns the field type. -
getCardinality
-
getOrder
public int getOrder()Returns the ordering key of the field on this topic type. -
getOrder
Returns the ordering key of the field on the topic type sent in as an argument. -
setOrder
-
moveAfter
Change field order so that this field is ordered directly after the other field.- Parameters:
other- the field to order after.
-
equals
-
hashCode
public int hashCode()
-