com.almworks.jira.structure.api.row.DummyRow Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of structure-api Show documentation
Show all versions of structure-api Show documentation
Public API for the Structure Plugin for JIRA
package com.almworks.jira.structure.api.row;
import com.almworks.jira.structure.api.item.ItemIdentity;
import com.atlassian.annotations.Internal;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Internal
public class DummyRow implements StructureRow {
private final long myRowId;
@NotNull
private final ItemIdentity myItemId;
private final long mySemantics;
@Nullable
private final Object myItem;
public DummyRow(long rowId, @NotNull ItemIdentity itemId, long semantics, @Nullable Object item) {
StructureRows.validateForestRowId(rowId);
myRowId = rowId;
myItemId = itemId;
mySemantics = semantics;
myItem = item;
}
@Override
public long getRowId() {
return myRowId;
}
@NotNull
@Override
public ItemIdentity getItemId() {
return myItemId;
}
@Override
public long getSemantics() {
return mySemantics;
}
@Nullable
@Override
public I getItem(@NotNull Class itemClass) {
return itemClass.isInstance(myItem) ? itemClass.cast(myItem) : null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy