Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.sdmlib.models.classes.util;
  
  
  public class ValuePO extends PatternObject<ValuePOValue>
  {
 
     public ValueSet allMatches()
    {
       this.setDoAllMatches(true);
       
       ValueSet matches = new ValueSet();
 
       while (this.getPattern().getHasMatch())
       {
          matches.add((Valuethis.getCurrentMatch());
          
          this.getPattern().findMatch();
       }
       
       return matches;
    }
 
 
    public ValuePO(){
       newInstance(CreatorCreator.createIdMap("PatternObjectType"));
    }
 
    public ValuePO(Value... hostGraphObject) {
       if(hostGraphObject==null || hostGraphObject.length<1){
          return ;
       }
       newInstance(CreatorCreator.createIdMap("PatternObjectType"), hostGraphObject);
    }
    public ValuePO hasInitialization(String value)
    {
       new AttributeConstraint()
       .withTgtValue(value)
       .withSrc(this)
       .withModifier(this.getPattern().getModifier())
       .withPattern(this.getPattern());
       
       this.getPattern().findMatch();
       
       return this;
    }
    
    public ValuePO hasInitialization(String lowerString upper)
    {
       new AttributeConstraint()
       .withTgtValue(lower)
       .withUpperTgtValue(upper)
       .withSrc(this)
       .withModifier(this.getPattern().getModifier())
       .withPattern(this.getPattern());
       
       this.getPattern().findMatch();
       
       return this;
    }
    
    public ValuePO createInitialization(String value)
    {
       this.startCreate().hasInitialization(value).endCreate();
       return this;
    }
    
    public String getInitialization()
    {
       if (this.getPattern().getHasMatch())
       {
          return ((ValuegetCurrentMatch()).getInitialization();
       }
       return null;
    }
    
    public ValuePO withInitialization(String value)
    {
       if (this.getPattern().getHasMatch())
       {
          ((ValuegetCurrentMatch()).setInitialization(value);
       }
       return this;
    }
    
    public ValuePO hasType(DataType value)
    {
       new AttributeConstraint()
       .withTgtValue(value)
       .withSrc(this)
       .withModifier(this.getPattern().getModifier())
       .withPattern(this.getPattern());
       
      this.getPattern().findMatch();
      
      return this;
   }
   
   public ValuePO createType(DataType value)
   {
      this.startCreate().hasType(value).endCreate();
      return this;
   }
   
   public DataType getType()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((ValuegetCurrentMatch()).getType();
      }
      return null;
   }
   
   public ValuePO withType(DataType value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((ValuegetCurrentMatch()).setType(value);
      }
      return this;
   }
   
   public ValuePO hasName(String value)
   {
      new AttributeConstraint()
      .withTgtValue(value)
      .withSrc(this)
      .withModifier(this.getPattern().getModifier())
      .withPattern(this.getPattern());
      
      this.getPattern().findMatch();
      
      return this;
   }
   
   public ValuePO hasName(String lowerString upper)
   {
      new AttributeConstraint()
      .withTgtValue(lower)
      .withUpperTgtValue(upper)
      .withSrc(this)
      .withModifier(this.getPattern().getModifier())
      .withPattern(this.getPattern());
      
      this.getPattern().findMatch();
      
      return this;
   }
   
   public ValuePO createName(String value)
   {
      this.startCreate().hasName(value).endCreate();
      return this;
   }
   
   public String getName()
   {
      if (this.getPattern().getHasMatch())
      {
         return ((ValuegetCurrentMatch()).getName();
      }
      return null;
   }
   
   public ValuePO withName(String value)
   {
      if (this.getPattern().getHasMatch())
      {
         ((ValuegetCurrentMatch()).withName(value);
      }
      return this;
   }
   
New to GrepCode? Check out our FAQ X