public class Relationship extends Object implements Serializable
Information about how blocks are related to each other. A Block
object contains 0 or more Relation objects in a list,
Relationships. For more information, see Block.
The Type element provides the type of the relationship for all
blocks in the IDs array.
| Constructor and Description |
|---|
Relationship() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<String> |
getIds()
An array of IDs for related blocks.
|
String |
getType()
The type of relationship that the blocks in the IDs array have with the
current block.
|
int |
hashCode() |
void |
setIds(Collection<String> ids)
An array of IDs for related blocks.
|
void |
setType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
void |
setType(String type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Relationship |
withIds(Collection<String> ids)
An array of IDs for related blocks.
|
Relationship |
withIds(String... ids)
An array of IDs for related blocks.
|
Relationship |
withType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
Relationship |
withType(String type)
The type of relationship that the blocks in the IDs array have with the
current block.
|
public String getType()
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD.
Constraints:
Allowed Values: VALUE, CHILD
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD.
RelationshipTypepublic void setType(String type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD.
Constraints:
Allowed Values: VALUE, CHILD
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD.
RelationshipTypepublic Relationship withType(String type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: VALUE, CHILD
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD.
RelationshipTypepublic void setType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD.
Constraints:
Allowed Values: VALUE, CHILD
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD.
RelationshipTypepublic Relationship withType(RelationshipType type)
The type of relationship that the blocks in the IDs array have with the
current block. The relationship can be VALUE or
CHILD.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: VALUE, CHILD
type -
The type of relationship that the blocks in the IDs array have
with the current block. The relationship can be
VALUE or CHILD.
RelationshipTypepublic List<String> getIds()
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
public void setIds(Collection<String> ids)
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
ids -
An array of IDs for related blocks. You can get the type of
the relationship from the Type element.
public Relationship withIds(String... ids)
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
Returns a reference to this object so that method calls can be chained together.
ids -
An array of IDs for related blocks. You can get the type of
the relationship from the Type element.
public Relationship withIds(Collection<String> ids)
An array of IDs for related blocks. You can get the type of the
relationship from the Type element.
Returns a reference to this object so that method calls can be chained together.
ids -
An array of IDs for related blocks. You can get the type of
the relationship from the Type element.
public String toString()
toString in class ObjectObject.toString()Copyright © 2019. All rights reserved.