-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use class like declaration identifiers retriever for interface
- Loading branch information
Showing
5 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
public class CostModelMatcher<T extends Artifact<T>> implements MatcherInterface<T> { | ||
private static final Logger LOG = Logger.getLogger(CostModelMatcher.class.getCanonicalName()); | ||
|
||
/** | ||
* A function weighing a matching that incurred a cost. | ||
* | ||
* @param <T> the type of the artifacts | ||
*/ | ||
@FunctionalInterface | ||
public interface SimpleWeightFunction<T extends Artifact<T>> { | ||
|
||
float weigh(CMMatching<T> matching); | ||
} | ||
|
||
/** | ||
* A function weighing a matching that incurred a specific cost. | ||
* | ||
* @param <T> the type of the artifacts | ||
*/ | ||
@FunctionalInterface | ||
public interface WeightFunction<T extends Artifact<T>> { | ||
|
||
float weigh(CMMatching<T> matching, float quantity); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
public class CostModelMatcher<T extends Artifact<T>> implements MatcherInterface<T> { | ||
private static final Logger LOG = Logger.getLogger(CostModelMatcher.class.getCanonicalName()); | ||
|
||
/** | ||
* A function weighing a matching that incurred a cost. | ||
* | ||
* @param <T> the type of the artifacts | ||
*/ | ||
@FunctionalInterface | ||
public interface SimpleWeightFunction<T extends Artifact<T>> { | ||
|
||
float weigh(CMMatching<T> matching); | ||
float weight(CMMatching<T> matching); | ||
} | ||
|
||
/** | ||
* A function weighing a matching that incurred a specific cost. | ||
* | ||
* @param <T> the type of the artifacts | ||
*/ | ||
@FunctionalInterface | ||
public interface WeightFunction<T extends Artifact<T>> { | ||
|
||
float weigh(CMMatching<T> matching, float quantity); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
public class CostModelMatcher < T extends Artifact < T > > implements MatcherInterface < T > { private static final Logger LOG = Logger . getLogger ( CostModelMatcher . class . getCanonicalName ( ) ) ; @ FunctionalInterface public interface SimpleWeightFunction < T extends Artifact < T > > { float weigh ( CMMatching < T > matching ) ; float weight ( CMMatching < T > matching ) ; } @ FunctionalInterface public interface WeightFunction < T extends Artifact < T > > { float weigh ( CMMatching < T > matching , float quantity ) ; float weight ( CMMatching < T > matching , float quantity ) ; } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
public class CostModelMatcher<T extends Artifact<T>> implements MatcherInterface<T> { | ||
private static final Logger LOG = Logger.getLogger(CostModelMatcher.class.getCanonicalName()); | ||
|
||
/** | ||
* A function weighing a matching that incurred a cost. | ||
* | ||
* @param <T> the type of the artifacts | ||
*/ | ||
@FunctionalInterface | ||
public interface SimpleWeightFunction<T extends Artifact<T>> { | ||
|
||
float weigh(CMMatching<T> matching); | ||
} | ||
|
||
/** | ||
* A function weighing a matching that incurred a specific cost. | ||
* | ||
* @param <T> the type of the artifacts | ||
*/ | ||
@FunctionalInterface | ||
public interface WeightFunction<T extends Artifact<T>> { | ||
|
||
float weigh(CMMatching<T> matching, float quantity); | ||
float weight(CMMatching<T> matching, float quantity); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters