Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.sdmlib.models.taskflows.util;
  
  
  public class PeerProxyPO extends PatternObject<PeerProxyPOPeerProxy>
  {
 
     public PeerProxySet allMatches()
    {
       this.setDoAllMatches(true);
       
       PeerProxySet matches = new PeerProxySet();
 
       while (this.getPattern().getHasMatch())
       {
          matches.add((PeerProxythis.getCurrentMatch());
          
          this.getPattern().findMatch();
       }
       
       return matches;
    }
 
 
    public PeerProxyPO(){
       newInstance(CreatorCreator.createIdMap("PatternObjectType"));
    }
 
    public PeerProxyPO(PeerProxy... hostGraphObject) {
       if(hostGraphObject==null || hostGraphObject.length<1){
          return ;
       }
       newInstance(CreatorCreator.createIdMap("PatternObjectType"), hostGraphObject);
    }
    public PeerProxyPO hasIp(String value)
    {
       new AttributeConstraint()
       .withTgtValue(value)
       .withSrc(this)
       .withModifier(this.getPattern().getModifier())
       .withPattern(this.getPattern());
       
       this.getPattern().findMatch();
       
       return this;
    }
    
    public PeerProxyPO hasIp(String lowerString upper)
    {
       new AttributeConstraint()
       .withTgtValue(lower)
       .withUpperTgtValue(upper)
       .withSrc(this)
       .withModifier(this.getPattern().getModifier())
       .withPattern(this.getPattern());
       
       this.getPattern().findMatch();
       
       return this;
    }
    
    public PeerProxyPO createIp(String value)
    {
       this.startCreate().hasIp(value).endCreate();
       return this;
    }
    
    public String getIp()
    {
       if (this.getPattern().getHasMatch())
       {
          return ((PeerProxygetCurrentMatch()).getIp();
       }
       return null;
    }
    
    public PeerProxyPO withIp(String value)
    {
       if (this.getPattern().getHasMatch())
       {
          ((PeerProxygetCurrentMatch()).setIp(value);
       }
       return this;
    }
    
    public PeerProxyPO hasPort(int value)
    {
       new AttributeConstraint()
       .withTgtValue(value)
       .withSrc(this)
       .withModifier(this.getPattern().getModifier())
       .withPattern(this.getPattern());
       
      this.getPattern().findMatch();
      
      return this;
   }
   
   public PeerProxyPO hasPort(int lowerint upper)
   {
      new AttributeConstraint()
      .withTgtValue(lower)
      .withUpperTgtValue(upper)
      .withSrc(this)
      .withModifier(this.getPattern().getModifier())
      .withPattern(this.getPattern());
      
      this.getPattern().findMatch();
      
      return this;
   }
   
   public PeerProxyPO createPort(int value)
   {
      this.startCreate().hasPort(value).endCreate();
      return this;
   }
   
   public int getPort()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((PeerProxygetCurrentMatch()).getPort();
      }
      return 0;
   }
   
   public PeerProxyPO withPort(int value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((PeerProxygetCurrentMatch()).setPort(value);
      }
      return this;
   }
   
   public PeerProxyPO hasIdMap(SDMLibJsonIdMap value)
   {
      new AttributeConstraint()
      .withTgtValue(value)
      .withSrc(this)
      .withModifier(this.getPattern().getModifier())
      .withPattern(this.getPattern());
      
      this.getPattern().findMatch();
      
      return this;
   }
   
   {
      this.startCreate().hasIdMap(value).endCreate();
      return this;
   }
   
   public SDMLibJsonIdMap getIdMap()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((PeerProxygetCurrentMatch()).getIdMap();
      }
      return null;
   }
   
   {
      if (this.getPattern().getHasMatch())
      {
         ((PeerProxygetCurrentMatch()).setIdMap(value);
      }
      return this;
   }
   
New to GrepCode? Check out our FAQ X