Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84F159D51 for ; Wed, 7 Mar 2012 23:32:08 +0000 (UTC) Received: (qmail 79788 invoked by uid 500); 7 Mar 2012 23:32:08 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 79688 invoked by uid 500); 7 Mar 2012 23:32:08 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 79680 invoked by uid 99); 7 Mar 2012 23:32:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 23:32:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 23:32:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C393E23888CC for ; Wed, 7 Mar 2012 23:31:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1298212 - in /commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow: DefaultFlowWeightedEdgesBuilder.java FlowWeightedEdgesBuilder.java Date: Wed, 07 Mar 2012 23:31:43 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120307233143.C393E23888CC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: simonetripodi Date: Wed Mar 7 23:31:43 2012 New Revision: 1298212 URL: http://svn.apache.org/viewvc?rev=1298212&view=rev Log: added builder to plug the mapper that gives weights for edges Added: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java (with props) commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java (with props) Added: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java?rev=1298212&view=auto ============================================================================== --- commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java (added) +++ commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java Wed Mar 7 23:31:43 2012 @@ -0,0 +1,44 @@ +package org.apache.commons.graph.flow; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import static org.apache.commons.graph.utils.Assertions.checkNotNull; + +import org.apache.commons.graph.DirectedGraph; +import org.apache.commons.graph.Mapper; + +public final class DefaultFlowWeightedEdgesBuilder> + implements FlowWeightedEdgesBuilder +{ + + private final G graph; + + public DefaultFlowWeightedEdgesBuilder( G graph ) + { + this.graph = graph; + } + + public FromHeadBuilder whereEdgesHaveWeights( Mapper weightedEdges ) + { + weightedEdges = checkNotNull( weightedEdges, "Function to calculate edges weight can not be null." ); + return null; + } + +} Propchange: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/DefaultFlowWeightedEdgesBuilder.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java?rev=1298212&view=auto ============================================================================== --- commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java (added) +++ commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java Wed Mar 7 23:31:43 2012 @@ -0,0 +1,30 @@ +package org.apache.commons.graph.flow; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.commons.graph.DirectedGraph; +import org.apache.commons.graph.Mapper; + +public interface FlowWeightedEdgesBuilder> +{ + + FromHeadBuilder whereEdgesHaveWeights( Mapper weightedEdges ); + +} Propchange: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: commons/sandbox/graph/branches/drop-marker-interfaces-feature/src/main/java/org/apache/commons/graph/flow/FlowWeightedEdgesBuilder.java ------------------------------------------------------------------------------ svn:mime-type = text/plain