// Path: hazeltask-core/src/main/java/com/hazeltask/core/concurrent/collections/grouped/Groupable.java
// public interface Groupable<G> {
// 	/**
// 	 * Return the group this object belongs to
// 	 * @return
// 	 */
// 	public G getGroup();
// }


import java.io.Serializable;
import com.hazeltask.core.concurrent.collections.grouped.Groupable;
package com.hazeltask.executor.task;




public class DefaultGroupableInfoProvidableTaskIdAdapter<I extends Serializable, G extends Serializable> implements TaskIdAdapter<TaskInfoProvidable<I,G>, G, Serializable> {

    @Override
    public G getTaskGroup(TaskInfoProvidable<I,G> task) {
        return task.getGroup();
    }

    @Override
    public boolean supports(Object task) {
// Path: hazeltask-core/src/main/java/com/hazeltask/core/concurrent/collections/grouped/Groupable.java
// public interface Groupable<G> {
// 	/**
// 	 * Return the group this object belongs to
// 	 * @return
// 	 */
// 	public G getGroup();
// }


// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/DefaultGroupableInfoProvidableTaskIdAdapter.java
import java.io.Serializable;
import com.hazeltask.core.concurrent.collections.grouped.Groupable;

package com.hazeltask.executor.task;




public class DefaultGroupableInfoProvidableTaskIdAdapter<I extends Serializable, G extends Serializable> implements TaskIdAdapter<TaskInfoProvidable<I,G>, G, Serializable> {

    @Override
    public G getTaskGroup(TaskInfoProvidable<I,G> task) {
        return task.getGroup();
    }

    @Override
    public boolean supports(Object task) {
       return task instanceof Groupable && task instanceof TaskInfoProvidable;