/*
 * Copyright (C) 2011, GitHub Inc. and others
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0 which is available at
 * https://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
package org.eclipse.jgit.submodule;

import org.eclipse.jgit.lib.ObjectId;

Status class containing the type, path, and commit id of the submodule.
/** * Status class containing the type, path, and commit id of the submodule. */
public class SubmoduleStatus { private final SubmoduleStatusType type; private final String path; private final ObjectId indexId; private final ObjectId headId;
Create submodule status
Params:
/** * Create submodule status * * @param type * a {@link org.eclipse.jgit.submodule.SubmoduleStatusType} * object. * @param path * submodule path * @param indexId * an {@link org.eclipse.jgit.lib.ObjectId} object. */
public SubmoduleStatus(final SubmoduleStatusType type, final String path, final ObjectId indexId) { this(type, path, indexId, null); }
Create submodule status
Params:
  • type – a SubmoduleStatusType object.
  • path – submodule path
  • indexId – index id
  • headId – head id
/** * Create submodule status * * @param type * a {@link org.eclipse.jgit.submodule.SubmoduleStatusType} * object. * @param path * submodule path * @param indexId * index id * @param headId * head id */
public SubmoduleStatus(final SubmoduleStatusType type, final String path, final ObjectId indexId, final ObjectId headId) { this.type = type; this.path = path; this.indexId = indexId; this.headId = headId; }
Get type
Returns:type
/** * Get type * * @return type */
public SubmoduleStatusType getType() { return type; }
Get submodule path
Returns:path submodule path
/** * Get submodule path * * @return path submodule path */
public String getPath() { return path; }
Get index object id
Returns:index object id
/** * Get index object id * * @return index object id */
public ObjectId getIndexId() { return indexId; }
Get HEAD object id
Returns:HEAD object id
/** * Get HEAD object id * * @return HEAD object id */
public ObjectId getHeadId() { return headId; } }