aQute.lib.osgi
Class Instruction

java.lang.Object
  extended by aQute.lib.osgi.Instruction

public class Instruction
extends Object


Constructor Summary
Instruction(String instruction, boolean negated)
           
 
Method Summary
 boolean equals(Object other)
           
 Matcher getMatcher(String value)
           
 String getPattern()
           
static Instruction getPattern(String string)
          Convert a string based pattern to a regular expression based pattern.
 int hashCode()
           
 boolean isNegated()
           
 boolean isOptional()
           
 boolean matches(String value)
           
static Map<Instruction,Map<String,String>> replaceWithInstruction(Map<String,Map<String,String>> header)
           
static
<T> Collection<T>
select(Collection<Instruction> matchers, Collection<T> targets)
           
 void setOptional()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Instruction

public Instruction(String instruction,
                   boolean negated)
Method Detail

matches

public boolean matches(String value)

isNegated

public boolean isNegated()

getPattern

public String getPattern()

getPattern

public static Instruction getPattern(String string)
Convert a string based pattern to a regular expression based pattern. This is called an instruction, this object makes it easier to handle the different cases

Parameters:
string -
Returns:

toString

public String toString()
Overrides:
toString in class Object

getMatcher

public Matcher getMatcher(String value)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

setOptional

public void setOptional()

isOptional

public boolean isOptional()

replaceWithInstruction

public static Map<Instruction,Map<String,String>> replaceWithInstruction(Map<String,Map<String,String>> header)

select

public static <T> Collection<T> select(Collection<Instruction> matchers,
                                       Collection<T> targets)


Copyright © 2012 aQute SARL. All Rights Reserved.